java.lang.Object | |
↳ | com.samsung.android.knox.ucm.configurator.UniversalCredentialManager |
This class provides APIs for Configurator application to manage and configure Credential storages
on the device. Credential Storage represent UCM plugin application. UCM framework binds to all Credential Storages on device.
Configurator app can call getAvailableCredentialStorages()
API to find all the Credential Storage on device.
Configurator should manage Credential Storage by calling manageCredentialStorage(CredentialStorage, boolean)
API before it calls other management API's.
API level 20 |
KNOX 2.7 |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACTION_UCM_CONFIG_STATUS | This broadcast intent is sent to notify Credential storage config status. | |||||||||
String | ACTION_UCM_KEYGUARD_SET | This broadcast intent is sent to notify all that UCM keyguard has been set | |||||||||
String | ACTION_UCM_KEYGUARD_UNSET | This broadcast intent is sent to notify all that UCM keyguard has been unset | |||||||||
String | ACTION_UCM_NOTIFY_EVENT | This broadcast intent is sent to notify UCM events. | |||||||||
String | ACTION_UCM_REFRESH_AGENT_DONE | This broadcast intent is sent to notify that agent refresh is done to caller | |||||||||
String | APPLET_FORM_FACTOR_ESE | This constant defines value for eSE form factor. | |||||||||
String | APPLET_FORM_FACTOR_ESE1 | This constant defines value for eSE1 form factor. | |||||||||
String | APPLET_FORM_FACTOR_SD | This constant defines value for SD form factor. | |||||||||
String | APPLET_FORM_FACTOR_SD1 | This constant defines value for SD1 form factor. | |||||||||
String | APPLET_FORM_FACTOR_SIM | This constant defines value for SIM form factor. | |||||||||
String | APPLET_FORM_FACTOR_SIM1 | This constant defines value for SIM1 form factor. | |||||||||
String | APPLET_FORM_FACTOR_SIM2 | This constant defines value for SIM2 form factor. | |||||||||
String | BUNDLE_CA_CERT_TYPE | This constant defines Bundle extra for CA certificate. | |||||||||
String | BUNDLE_EXTRA_ACCESS_TYPE | This constant defines Bundle extra for Credential Storage access type. | |||||||||
String | BUNDLE_EXTRA_ADD_PIN_CACHE_EXEMPTLIST | This constant defines Bundle Extra to add packages to pin cache exemptlist. | |||||||||
String | BUNDLE_EXTRA_ALIAS | This constant defines Bundle extra for alias name. | |||||||||
String | BUNDLE_EXTRA_ALLOW_WIFI |
Deprecated
in API level 35 NOTE: This is not available since Android 12. |
|||||||||
String | BUNDLE_EXTRA_ENFORCE_LOCK_TYPE_DIRECT_SET | This constant defines Bundle extra to specify if enforce lock type setting is directly shown. | |||||||||
String | BUNDLE_EXTRA_EVENT_ID | This constant defines Bundle extra for event id. | |||||||||
String | BUNDLE_EXTRA_ODE_CA_CERT | This constant defines Bundle extra to specify if CA certificate is for ODE. | |||||||||
String | BUNDLE_EXTRA_PACKAGE | This constant defines Bundle extra for package. | |||||||||
String | BUNDLE_EXTRA_PIN_CACHE | This constant defines Bundle extra for pin cache. | |||||||||
String | BUNDLE_EXTRA_PIN_CACHE_TIMEOUT_MINUTES | This constant defines Bundle Extra for timeout. | |||||||||
String | BUNDLE_EXTRA_REMOVE_PIN_CACHE_EXEMPTLIST | This constant defines Bundle Extra to remove packages from pin cache exemptlist. | |||||||||
String | BUNDLE_EXTRA_REQUEST_ID | This constant defines Bundle extra for request id. | |||||||||
String | BUNDLE_EXTRA_STATUS_CODE | This constant defines Bundle extra for status code. | |||||||||
String | BUNDLE_EXTRA_USER_ID | This constant defines Bundle Extra for user id. | |||||||||
int | ERROR_UCM_ALIAS_ALREADY_EXIST | This error constant is returned when certificate alias already exist for Credential Storage. | |||||||||
int | ERROR_UCM_ALIAS_EMPTY | This error constant is returned when Alias name is empty in Bundle. | |||||||||
int | ERROR_UCM_ALIAS_NOT_EXIST | This error constant is returned when alias do not exist for Credential storage. | |||||||||
int | ERROR_UCM_APP_SIGNATURE_INVALID | This error constant is returned when application signature is invalid. | |||||||||
int | ERROR_UCM_CALLER_NOT_ALLOWED_TO_MANAGE_STORAGE | This error constant is returned when caller is not allowed to manage Storage. | |||||||||
int | ERROR_UCM_CALLER_NOT_CONTAINER_OWNER | This error constant is returned when caller is not the owner of container. | |||||||||
int | ERROR_UCM_FAILURE | This error constant is returned when API execution failed. | |||||||||
int | ERROR_UCM_INSTALL_DELEGATION_NOT_ALLOWED | This error constant is returned when install delegation is not allowed. | |||||||||
int | ERROR_UCM_INVALID_ACCESS_TYPE | This error constant is returned when Access type is invalid. | |||||||||
int | ERROR_UCM_INVALID_AUTH_TYPE | This error constant is returned when Authentication type is invalid. | |||||||||
int | ERROR_UCM_INVALID_CERTIFICATE | This error constant is returned when certificate is not valid. | |||||||||
int | ERROR_UCM_INVALID_EXEMPT_TYPE | This error constant is returned when Exempt type is invalid. | |||||||||
int | ERROR_UCM_INVALID_STORAGE_OPTION | This error constant is returned when Storage option is invalid. | |||||||||
int | ERROR_UCM_KEYGUARD_CONFIGURED | This error constant is returned when configurator tries to unmanaged storage which is configured with Keyguard. | |||||||||
int | ERROR_UCM_KEYGUARD_WRONG_PIN | This error constant is returned when user input wrong pin on changePin. | |||||||||
int | ERROR_UCM_MISSING_ARGUMENT | This error constant is returned when mandatory arguments were not passed. | |||||||||
int | ERROR_UCM_PASSWORD_QUALITY_NOT_UNSPECIFIED | This error constant is returned when current password quality is not "PASSWORD_QUALITY_UNSPECIFIED". | |||||||||
int | ERROR_UCM_PASSWORD_UNSUPPORTED_STORAGE | This error constant is returned when trying to set lock type to a Storage which does not support GeneratePassword. | |||||||||
int | ERROR_UCM_STORAGE_ALREADY_CONFIGURED | This error constant is returned when other admin has already configured the Credential storage as device lock type. | |||||||||
int | ERROR_UCM_STORAGE_DELEGATION_NOT_ALLOWED | This error constant is returned when storage delegation is not allowed. | |||||||||
int | ERROR_UCM_STORAGE_NOT_ENABLED | This error constant is returned when Credential storage is not enabled. | |||||||||
int | ERROR_UCM_STORAGE_NOT_MANAGEABLE | This error constant is returned when Storage is not manageable. | |||||||||
int | ERROR_UCM_STORAGE_NOT_SUPPORT | This error constant is returned when storage does not support api. | |||||||||
int | ERROR_UCM_STORAGE_NOT_VALID | This error constant is returned when Credential storage is not valid. | |||||||||
int | EVENT_PLUGIN_LICENSE_EXPIRED | This constant is returned in ACTION_UCM_NOTIFY_EVENT when Credential Storage license expired. | |||||||||
int | EVENT_PLUGIN_UNINSTALLED | This constant is returned in ACTION_UCM_NOTIFY_EVENT when Credential Storage uninstalled. | |||||||||
int | PIN_CACHE_KEYGUARD_TIMEOUT | This constant defines value to cache pin till keyguard timeout. | |||||||||
int | PIN_CACHE_TIMEOUT | This constant defines value to cache pin till timeout. | |||||||||
String | RESET_APPLET_FORM_FACTOR | This constant defines value to reset form factor to default. | |||||||||
String | SCP_SD | This constant defines value for CA certificate type. | |||||||||
int | UCM_ACCESS_TYPE_CERTIFICATE | This constant defines value for Certificate access type. | |||||||||
int | UCM_ACCESS_TYPE_INSTALL | This constant defines the Install delegation for access type | |||||||||
int | UCM_ACCESS_TYPE_STORAGE | This constant defines value for Storage access type. | |||||||||
String | UCM_APPLET_DELETE | This constant defines value to delete applet. | |||||||||
String | UCM_APPLET_ID | This constant defines value for APPLET ID. | |||||||||
String | UCM_APPLET_INSTALL_LOCATION | This constant defines value for APPLET INSTALL location. | |||||||||
String | UCM_APPLET_UPGRADE | This constant defines value to upgrade applet. | |||||||||
int | UCM_AUTH_TYPE_LOCKED | This constant defines value for Lock authentication type. | |||||||||
int | UCM_AUTH_TYPE_NONE | This constant defines value for NONE authentication type. | |||||||||
int | UCM_EXEMPT_TYPE_AUTH | This constant defines value for exempt type authentication. | |||||||||
int | UCM_SUCCESS | This constant is returned when API execution is successful. | |||||||||
int | UCM_SUCCESS_KEYGUARD_ALREADY_CONFIGURED | This constant is returned when same admin has already configured the keyguard using same plugin. | |||||||||
String | WIFI_VIRTUAL_PACKAGE | This constant defines value for virtual Wifi package. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EVENT_PLUGIN_APPLET_DELETE_COMPLETED | This constant is returned in ACTION_UCM_CONFIG_STATUS when applet delete is completed. | ||||||||||
EVENT_PLUGIN_APPLET_DELETE_FAILED | This constant is returned in ACTION_UCM_CONFIG_STATUS when applet delete is failed. | ||||||||||
EVENT_PLUGIN_APPLET_INSTALL_COMPLETED | This constant is returned in ACTION_UCM_CONFIG_STATUS when applet install is completed. | ||||||||||
EVENT_PLUGIN_APPLET_INSTALL_FAILED | This constant is returned in ACTION_UCM_CONFIG_STATUS when applet install is failed. | ||||||||||
EVENT_PLUGIN_APPLET_UPDATE_COMPLETED | This constant is returned in ACTION_UCM_CONFIG_STATUS when applet update is completed. | ||||||||||
EVENT_PLUGIN_APPLET_UPDATE_FAILED | This constant is returned in ACTION_UCM_CONFIG_STATUS when applet update is failed. | ||||||||||
KEY_PLUGIN_EVENT | This constant defines EVENT of plugin about install or update status. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
API to exempt application(s) to use Credential storage.
| |||||||||||
API to whitelist application(s) to use Credential storage or access the Certificate stored inside Credential Storage.
| |||||||||||
API to change KeyguardPin.
| |||||||||||
API to clear whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential storage.
| |||||||||||
API to configure Credential Storage for ODE Settings.
| |||||||||||
API to configure Credential storage plugin.
| |||||||||||
Deprecated
in API level 37
| |||||||||||
API to delete certificate from Credential storage.
| |||||||||||
API to enforce the Credential storage as Lock type.
| |||||||||||
API to enforce the Credential storage as Lock type.
| |||||||||||
API to get all the certificate aliases related to Credential storage.
| |||||||||||
API to get the Authentication type for Credential storage.
| |||||||||||
API to get the list of all available Credential storages on device.
| |||||||||||
Deprecated
in API level 37
| |||||||||||
Deprecated
in API level 37
| |||||||||||
API to get Credential storage plugin configuration.
| |||||||||||
API to get plugin property.
| |||||||||||
API to get all the Credential Storages which can be accessed by a package.
| |||||||||||
API to get the Credential storage which is enforced as Lock type.
| |||||||||||
API to get retry count (current remain count, not max count) of KeyguardPIN.
| |||||||||||
API to get maximum length of KeyguardPIN.
| |||||||||||
API to get maximum retry count (not current remain count) of KeyguardPIN.
| |||||||||||
API to get minimum length of KeyguardPIN.
| |||||||||||
API to get ODE configuration settings.
| |||||||||||
API to get the exempted application(s) related to Credential storage.
| |||||||||||
API to get all whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential storage.
| |||||||||||
API to get all the supported algorithms related to Credential storage.
| |||||||||||
API to get UniversalCredentialManager instance.
| |||||||||||
API to get UniversalCredentialManager instance.
| |||||||||||
API to set default PIN to Credential Storage.
| |||||||||||
Deprecated
in API level 37
| |||||||||||
API to install certificate in Credential storage.
| |||||||||||
API to check whether Credential Storage is managed by calling Configurator.
| |||||||||||
API to manage or unmanage Credential storage.
| |||||||||||
API to remove exempted application(s) related to Credential storage.
| |||||||||||
API to remove whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential Storage.
| |||||||||||
API to set the Authentication type for Credential storage.
| |||||||||||
API to send properties to Credential Storage.
| |||||||||||
API to set maximum length of KeyguardPIN.
| |||||||||||
API to set maximum retry count of Credential Storage Keyguard.
| |||||||||||
API to set minimum Length of KeyguardPIN.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This broadcast intent is sent to notify Credential storage config status.
API level 20 |
KNOX 2.7 |
This broadcast intent is sent to notify all that UCM keyguard has been set
API level 20 |
KNOX 2.7 |
This broadcast intent is sent to notify all that UCM keyguard has been unset
API level 20 |
KNOX 2.7 |
This broadcast intent is sent to notify UCM events.
API level 20 |
KNOX 2.7 |
This broadcast intent is sent to notify that agent refresh is done to caller
API level 26 |
KNOX 3.2 |
This constant defines value for eSE form factor.
API level 20 |
KNOX 2.7 |
This constant defines value for eSE1 form factor.
API level 20 |
KNOX 2.7 |
This constant defines value for SD form factor.
API level 20 |
KNOX 2.7 |
This constant defines value for SD1 form factor.
API level 20 |
KNOX 2.7 |
This constant defines value for SIM form factor.
API level 20 |
KNOX 2.7 |
This constant defines value for SIM1 form factor.
API level 20 |
KNOX 2.7 |
This constant defines value for SIM2 form factor.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for CA certificate.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for Credential Storage access type.
API level 20 |
KNOX 2.7 |
This constant defines Bundle Extra to add packages to pin cache exemptlist.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for alias name.
API level 20 |
KNOX 2.7 |
Deprecated
in API level 35
NOTE: This is not available since Android 12.
This constant defines Bundle extra to allow wifi certificate.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra to specify if enforce lock type setting is directly shown.
API level 22 |
KNOX 2.8 |
This constant defines Bundle extra for event id.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra to specify if CA certificate is for ODE.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for package.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for pin cache.
API level 20 |
KNOX 2.7 |
This constant defines Bundle Extra for timeout.
API level 20 |
KNOX 2.7 |
This constant defines Bundle Extra to remove packages from pin cache exemptlist.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for request id.
API level 20 |
KNOX 2.7 |
This constant defines Bundle extra for status code.
API level 20 |
KNOX 2.7 |
This constant defines Bundle Extra for user id.
API level 20 |
KNOX 2.7 |
This error constant is returned when certificate alias already exist for Credential Storage.
API level 20 |
KNOX 2.7 |
This error constant is returned when Alias name is empty in Bundle.
API level 20 |
KNOX 2.7 |
This error constant is returned when alias do not exist for Credential storage.
API level 20 |
KNOX 2.7 |
This error constant is returned when application signature is invalid.
API level 20 |
KNOX 2.7 |
This error constant is returned when caller is not allowed to manage Storage.
API level 20 |
KNOX 2.7 |
This error constant is returned when caller is not the owner of container.
API level 20 |
KNOX 2.7 |
This error constant is returned when API execution failed.
API level 20 |
KNOX 2.7 |
This error constant is returned when install delegation is not allowed.
API level 22 |
KNOX 2.8 |
This error constant is returned when Access type is invalid.
API level 20 |
KNOX 2.7 |
This error constant is returned when Authentication type is invalid.
API level 20 |
KNOX 2.7 |
This error constant is returned when certificate is not valid.
API level 20 |
KNOX 2.7 |
This error constant is returned when Exempt type is invalid.
API level 20 |
KNOX 2.7 |
This error constant is returned when Storage option is invalid.
API level 20 |
KNOX 2.7 |
This error constant is returned when configurator tries to unmanaged storage which is configured with Keyguard.
API level 20 |
KNOX 2.7 |
This error constant is returned when user input wrong pin on changePin.
API level 37 |
KNOX 3.10 |
This error constant is returned when mandatory arguments were not passed.
API level 20 |
KNOX 2.7 |
This error constant is returned when current password quality is not "PASSWORD_QUALITY_UNSPECIFIED".
API level 20 |
KNOX 2.7 |
This error constant is returned when trying to set lock type to a Storage which does not support GeneratePassword.
API level 20 |
KNOX 2.7 |
This error constant is returned when other admin has already configured the Credential storage as device lock type.
API level 20 |
KNOX 2.7 |
This error constant is returned when storage delegation is not allowed.
API level 22 |
KNOX 2.8 |
This error constant is returned when Credential storage is not enabled.
API level 20 |
KNOX 2.7 |
This error constant is returned when Storage is not manageable.
API level 20 |
KNOX 2.7 |
This error constant is returned when storage does not support api.
API level 37 |
KNOX 3.10 |
This error constant is returned when Credential storage is not valid.
API level 20 |
KNOX 2.7 |
This constant is returned in ACTION_UCM_NOTIFY_EVENT when Credential Storage license expired.
API level 20 |
KNOX 2.7 |
This constant is returned in ACTION_UCM_NOTIFY_EVENT when Credential Storage uninstalled.
API level 20 |
KNOX 2.7 |
This constant defines value to cache pin till keyguard timeout.
API level 20 |
KNOX 2.7 |
This constant defines value to cache pin till timeout.
API level 20 |
KNOX 2.7 |
This constant defines value to reset form factor to default.
API level 20 |
KNOX 2.7 |
This constant defines value for CA certificate type.
API level 20 |
KNOX 2.7 |
This constant defines value for Certificate access type.
API level 20 |
KNOX 2.7 |
This constant defines the Install delegation for access type
API level 22 |
KNOX 2.8 |
This constant defines value for Storage access type.
API level 20 |
KNOX 2.7 |
This constant defines value to delete applet.
API level 37 |
KNOX 3.10 |
This constant defines value for APPLET ID.
API level 20 |
KNOX 2.7 |
This constant defines value for APPLET INSTALL location.
API level 20 |
KNOX 2.7 |
This constant defines value to upgrade applet.
API level 37 |
KNOX 3.10 |
This constant defines value for Lock authentication type.
API level 20 |
KNOX 2.7 |
This constant defines value for NONE authentication type.
API level 20 |
KNOX 2.7 |
This constant defines value for exempt type authentication.
API level 20 |
KNOX 2.7 |
This constant is returned when API execution is successful.
API level 20 |
KNOX 2.7 |
This constant is returned when same admin has already configured the keyguard using same plugin.
API level 21 |
KNOX 2.7.1 |
This constant defines value for virtual Wifi package.
API level 20 |
KNOX 2.7 |
This constant is returned in ACTION_UCM_CONFIG_STATUS when applet delete is completed.
API level 37 |
KNOX 3.10 |
This constant is returned in ACTION_UCM_CONFIG_STATUS when applet delete is failed.
API level 37 |
KNOX 3.10 |
This constant is returned in ACTION_UCM_CONFIG_STATUS when applet install is completed.
API level 37 |
KNOX 3.10 |
This constant is returned in ACTION_UCM_CONFIG_STATUS when applet install is failed.
API level 37 |
KNOX 3.10 |
This constant is returned in ACTION_UCM_CONFIG_STATUS when applet update is completed.
API level 37 |
KNOX 3.10 |
This constant is returned in ACTION_UCM_CONFIG_STATUS when applet update is failed.
API level 37 |
KNOX 3.10 |
This constant defines EVENT of plugin about install or update status.
API level 37 |
KNOX 3.10 |
API to exempt application(s) to use Credential storage.
cs | Credential Storage of plugin |
---|---|
type | UCM_EXEMPT_TYPE_AUTH |
list | AppIdentity list to exempt |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
UCM default behavior is to allow whitelisted application(s) to access Credential Storage when device is locked.
But authentication type is configured as |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to whitelist application(s) to use Credential storage or access the Certificate stored inside Credential Storage.
cs | Credential Storage of plugin |
---|---|
list | AppIdentity list to whitelist |
extras | bundle for whitelist type |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to whitelist application(s) to use Credential storage or access the Certificate stored inside Credential Storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to change KeyguardPin.
cs | Credential Storage of plugin |
---|---|
currentPin | : current Pin |
newPin | : new Pin |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_KEYGUARD_WRONG_PIN
, if current Pin is wrong ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to change KeyguardPIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.changeKeyguardPin(cs, currentPin, newPin); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.changeKeyguardPin(cs, currentPin, newPin); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
API to clear whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential storage.
cs | Credential Storage of plugin |
---|---|
extras | bundle for whitelist type |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to clear whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // Clear whitelisted application which is allowed to access storage Bundle data = new Bundle(); data.putInt(BUNDLE_EXTRA_ACCESS_TYPE, UCM_ACCESS_TYPE_STORAGE); int result = ucmMgr.clearWhiteList(cs, data); // Clear whitelisted application which is allowed to access Certificate stored inside Credential Storage data = new Bundle(); data.putInt(BUNDLE_EXTRA_ACCESS_TYPE, UCM_ACCESS_TYPE_CERTIFICATE); data.putString(BUNDLE_EXTRA_ALIAS, "alias_name"); result = ucmMgr.clearWhiteList(cs, data); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // Clear whitelisted application which is allowed to access storage Bundle data = new Bundle(); data.putInt(BUNDLE_EXTRA_ACCESS_TYPE, UCM_ACCESS_TYPE_STORAGE); int result = ucmMgr.clearWhiteList(cs, data); // Clear whitelisted application which is allowed to access Certificate stored inside Credential Storage data = new Bundle(); data.putInt(BUNDLE_EXTRA_ACCESS_TYPE, UCM_ACCESS_TYPE_CERTIFICATE); data.putString(BUNDLE_EXTRA_ALIAS, "alias_name"); result = ucmMgr.clearWhiteList(cs, data); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to configure Credential Storage for ODE Settings.
cs | Credential Storage of plugin |
---|---|
scpParam | SCP parameters it is vendor specific parameters |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_MISSING_ARGUMENT
ERROR_UCM_STORAGE_NOT_ENABLED
SecurityException | If caller does not have required permissions or caller is not device administrator |
---|
Configurator can use this API to configure Credential Storage for ODE Settings. Credential Storage plugin with attribute "isODESupport =
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { Bundle scpParam = new Bundle(); int result = ucmMgr.configureCredentialStorageForODESettings(cs, scpParam); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 22 |
KNOX 2.8 |
Global Scope |
API to configure Credential storage plugin.
cs | CredentialStorage of plugin |
---|---|
pluginConfig | bundle for configuration parameters |
ERROR_UCM_FAILURE
ERROR_UCM_MISSING_ARGUMENT
ERROR_UCM_STORAGE_NOT_VALID
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to configure Credential storage plugin by passing Bundle data. Successful API call will return requestId. |
private BroadcastReceiver mUcsReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(UniversalCredentialStorageManager.INTENT_UCSM_CONFIG_STATUS)) { if(intent.getExtras() != null) { Bundle data = intent.getExtras(); if(data != null) { int requestId = data.getInt(UniversalCredentialStorageManager.BUNDLE_EXTRA_REQUEST_ID , 0); int statusCode = data.getInt(UniversalCredentialStorageManager.BUNDLE_EXTRA_STATUS_CODE, -1); int installStatus = data.getInt(UniversalCredentialStorageManager.KEY_PLUGIN_EVENT, -1); switch (installStatus) { case UniversalCredentialStorageManager.EVENT_PLUGIN_APPLET_INSTALL_COMPLETED: // install complete break; case UniversalCredentialStorageManager.EVENT_PLUGIN_APPLET_INSTALL_FAILED: // install failed break; case UniversalCredentialStorageManager.EVENT_PLUGIN_APPLET_DELETE_COMPLETED: // delete complete break; case UniversalCredentialStorageManager.EVENT_PLUGIN_APPLET_DELETE_FAILED: // delete faild break; case : -1 default : // no data } if (installStatus != -1) { if (installStatus == UniversalCredentialStorageManager.EVENT_PLUGIN_APPLET_INSTALL_COMPLETED) { // install complete } else { } } } } } } }; |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle data = new Bundle(); data.putString("Plugin pre-shared key", "Plugin pre-shared value"); int requestId = ucmMgr.configureCredentialStoragePlugin(cs, data); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle data = new Bundle(); data.putString("Plugin pre-shared key", "Plugin pre-shared value"); int requestId = ucmMgr.configureCredentialStoragePlugin(cs, data); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
Deprecated in API level 37
API to delete CA certificate.
alias | alias name to remove |
---|
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to delete CA certificate. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { int result = ucmMgr.deleteCACertificate(alias); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { int result = ucmMgr.deleteCACertificate(alias); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to delete certificate from Credential storage.
cs | Credential Storage of plugin |
---|---|
alias | alias name to remove |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_MISSING_ARGUMENT
ERROR_UCM_STORAGE_NOT_ENABLED
ERROR_UCM_ALIAS_NOT_EXIST
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to delete certificate from Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; String alias = "alias_name"; int result = ucmMgr.deleteCertificate(cs, alias); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; String alias = "alias_name"; int result = ucmMgr.deleteCertificate(cs, alias); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to enforce the Credential storage as Lock type.
cs | Credential Storage of plugin |
---|
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions or caller is not device administrator |
---|
Configurator can use this API to enforce the Credential storage as only Lock Type. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.enforceCredentialStorageAsLockType(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.enforceCredentialStorageAsLockType(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to enforce the Credential storage as Lock type.
cs | Credential Storage of plugin |
---|---|
options | includes BUNDLE_EXTRA_ENFORCE_LOCK_TYPE_DIRECT_SET options |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions or caller is not device administrator |
---|
Configurator can use this API to enforce the Credential storage as only Lock Type. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle options = new Bundle(); options.putBoolean(UniversalCredentialManager.BUNDLE_EXTRA_ENFORCE_LOCK_TYPE_DIRECT_SET, true); int result = ucmMgr.enforceCredentialStorageAsLockType(cs, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle options = new Bundle(); options.putBoolean(UniversalCredentialManager.BUNDLE_EXTRA_ENFORCE_LOCK_TYPE_DIRECT_SET, true); int result = ucmMgr.enforceCredentialStorageAsLockType(cs, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 22 |
KNOX 2.8 |
User Scope |
API to get all the certificate aliases related to Credential storage.
cs | Credential Storage of plugin |
---|
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get all the aliases related to Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; String[] aliases = ucmMgr.getAliases(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; String[] aliases = ucmMgr.getAliases(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get the Authentication type for Credential storage.
cs | Credential Storage of plugin |
---|
UCM_AUTH_TYPE_LOCKED
or UCM_AUTH_TYPE_NONE
. SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get Authentication type for Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int type = ucmMgr.getAuthType(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int type = ucmMgr.getAuthType(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get the list of all available Credential storages on device.
CredentialStorage
arraySecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get the list of all available storages on device.
|
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage[] storages = ucmMgr.getAvailableCredentialStorages(); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage[] storages = ucmMgr.getAvailableCredentialStorages(); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
Deprecated in API level 37
API to get CA certificate.
alias | alias name to get |
---|
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get CA certificate. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CACertificateInfo result = ucmMgr.getCACertificate(alias); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CACertificateInfo result = ucmMgr.getCACertificate(alias); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
Deprecated in API level 37
API to get CA certificate aliases.
option | reserved |
---|
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get CA certificate aliases. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { Bundle options = new Bundle(); String[] result = ucmMgr.getCACertificateAliases(options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { Bundle options = new Bundle(); String[] result = ucmMgr.getCACertificateAliases(options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get Credential storage plugin configuration.
cs | Credential Storage of plugin |
---|
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get Credential storage plugin configuration. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle data = ucmMgr.getCredentialStoragePluginConfiguration(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle data = ucmMgr.getCredentialStoragePluginConfiguration(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get plugin property.
cs | Credential Storage of plugin |
---|---|
data | reserved |
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get data from plugin. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle option = ucmMgr.getCredentialStorageProperty(cs, null); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle option = ucmMgr.getCredentialStorageProperty(cs, null); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get all the Credential Storages which can be accessed by a package.
packageName | package name of application to check Credential Storage access |
---|
CredentialStorage
arraySecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get all the Credential Storages which can be accessed by a package. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage[] storages = ucmMgr.getCredentialStorages("com.test"); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage[] storages = ucmMgr.getCredentialStorages("com.test"); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get the Credential storage which is enforced as Lock type.
CredentialStorage
enforced Credential StorageSecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get the Credential storage which is enforced as Lock type. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage storage = ucmMgr.getEnforcedCredentialStorageForLockType(); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage storage = ucmMgr.getEnforcedCredentialStorageForLockType(); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get retry count (current remain count, not max count) of KeyguardPIN.
cs | Credential Storage of plugin |
---|
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to get current retrycount of KeyguardPIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getCurrentKeyguardPinRetryCount(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getCurrentKeyguardPinRetryCount(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
API to get maximum length of KeyguardPIN.
cs | Credential Storage of plugin |
---|
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to get condition about length of PIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getKeyguardPinMaximumLength(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getKeyguardPinMaximumLength(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
API to get maximum retry count (not current remain count) of KeyguardPIN.
cs | Credential Storage of plugin |
---|
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to get retrycount of KeyguardPIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getKeyguardPinMaximumRetryCount(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getKeyguardPinMaximumRetryCount(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
API to get minimum length of KeyguardPIN.
cs | Credential Storage of plugin |
---|
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to get condition about length of PIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getKeyguardPinMinimumLength(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.getKeyguardPinMinimumLength(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
API to get ODE configuration settings.
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get ODE configuration settings. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { Bundle result = ucmMgr.getODESettingsConfiguration(); String agentId = result.getString(UniversalCredentialUtil.AGENT_ID, ""); byte[] pluginSignature = result.getByteArray(UniversalCredentialUtil.ODE_SIGNATURE); boolean encrypted = result.getBoolean(UniversalCredentialUtil.ODE_ENABLED, false); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 22 |
KNOX 2.8 |
Global Scope |
API to get the exempted application(s) related to Credential storage.
cs | Credential Storage of plugin |
---|---|
type | UCM_EXEMPT_TYPE_AUTH |
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get the exempt application(s) related to Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get all whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential storage.
cs | Credential Storage of plugin |
---|---|
extras | bundle for whitelist type |
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get all whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // Get all the whitelisted application(s) which are allowed to access storage Bundle data = new Bundle(); data.putInt(BUNDLE_EXTRA_ACCESS_TYPE, UCM_ACCESS_TYPE_STORAGE); List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // Get all the whitelisted application(s) which are allowed to access storage Bundle data = new Bundle(); data.putInt(BUNDLE_EXTRA_ACCESS_TYPE, UCM_ACCESS_TYPE_STORAGE); List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get all the supported algorithms related to Credential storage.
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to get all the supported algorithms related to Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; String[] algorithms = ucmMgr.getSupportedAlgorithms(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; String[] algorithms = ucmMgr.getSupportedAlgorithms(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to get UniversalCredentialManager instance.
context | Context of calling application |
---|
API to get UniversalCredentialManager instance. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); |
API level 20 |
KNOX 2.7 |
API to get UniversalCredentialManager instance.
context | Context of calling application |
---|---|
containerID | Id of the container |
API to get UniversalCredentialManager instance. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); |
API level 20 |
KNOX 2.7 |
API to set default PIN to Credential Storage.
cs | Credential Storage of plugin |
---|---|
newPin | initial PIN |
options | includes options for future requirement |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to initialize KeyguardPIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle options = new Bundle(); int result = ucmMgr.initKeyguardPin(cs, newPin, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; Bundle options = new Bundle(); int result = ucmMgr.initKeyguardPin(cs, newPin, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
Deprecated in API level 37
API to install CA certificate for SCP communication.
certBytes | CA certificate byte array to install |
---|---|
alias | CA certificate alias to install |
options | bundle to determine CA certificate type |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to install certificate for SCP communication. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { File objFile = new File("/mnt/sdcard/cacert.der"); byte object_buffer[] = new byte[(int) objFile.length()]; FileInputStream fs = new FileInputStream(objFile); fs.read(object_buffer); fs.close(); String alias = "ca_cert"; Bundle options = new Bundle(); options.putString(UniversalCredentialManager.BUNDLE_CA_CERT_TYPE, UniversalCredentialManager.SCP_SD); options.putBoolean(UniversalCredentialManager.BUNDLE_EXTRA_ODE_CA_CERT, false); int result = ucmMgr.installCACertificate(object_buffer, alias, options); // CA certificate for ode alias = "ca_cert_ode"; options = new Bundle(); options.putString(UniversalCredentialManager.BUNDLE_CA_CERT_TYPE, UniversalCredentialManager.SCP_SD); options.putBoolean(UniversalCredentialManager.BUNDLE_EXTRA_ODE_CA_CERT, true); result = ucmMgr.installCACertificate(object_buffer, alias, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { File objFile = new File("/mnt/sdcard/cacert.der"); byte object_buffer[] = new byte[(int) objFile.length()]; FileInputStream fs = new FileInputStream(objFile); fs.read(object_buffer); fs.close(); String alias = "ca_cert"; Bundle options = new Bundle(); options.putString(UniversalCredentialManager.BUNDLE_CA_CERT_TYPE, UniversalCredentialManager.SCP_SD); options.putBoolean(UniversalCredentialManager.BUNDLE_EXTRA_ODE_CA_CERT, false); int result = ucmMgr.installCACertificate(object_buffer, alias, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to install certificate in Credential storage.
cs | Credential Storage of plugin |
---|---|
certBytes | certificate byte array to install |
alias | certificate alias to install |
privateKeyPassword | password of input certificate file |
options | bundle to determine certificate type |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_MISSING_ARGUMENT
ERROR_UCM_STORAGE_NOT_ENABLED
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to install certificate in Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; File objFile = new File("/mnt/sdcard/cert.pem"); byte object_buffer[] = new byte[(int) objFile.length()]; FileInputStream fs = new FileInputStream(objFile); fs.read(object_buffer); fs.close(); String alias = "alias_name"; String certPwd = "1234"; Bundle options = new Bundle(); // Note : BUNDLE_EXTRA_ALLOW_WIFI is deprecated in API level 35. // To install wifi certificate //options.putBoolean(BUNDLE_EXTRA_ALLOW_WIFI, true); //int result = ucmMgr.installCertificate(cs, object_buffer, alias, certPwd, options); // To install non wifi certificate. //options.putBoolean(BUNDLE_EXTRA_ALLOW_WIFI, false); // This is optional. default value is false. result = ucmMgr.installCertificate(cs, object_buffer, alias, certPwd, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; File objFile = new File("/mnt/sdcard/cert.pem"); byte object_buffer[] = new byte[(int) objFile.length()]; FileInputStream fs = new FileInputStream(objFile); fs.read(object_buffer); fs.close(); String alias = "alias_name"; String certPwd = "1234"; Bundle options = new Bundle(); // To install non wifi certificate //options.putBoolean(BUNDLE_EXTRA_ALLOW_WIFI, false); // This is optional. default value is false. result = ucmMgr.installCertificate(cs, object_buffer, alias, certPwd, options); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to check whether Credential Storage is managed by calling Configurator.
cs | Credential Storage of plugin |
---|
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to check whether Credential Storage is managed by calling Configurator. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; boolean status = ucmMgr.isCredentialStorageManaged(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; boolean status = ucmMgr.isCredentialStorageManaged(cs); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to manage or unmanage Credential storage.
cs | Credential Storage of plugin |
---|
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to manage or unmanage Credential Storage. Configurator should manage Credential Storage before it calls other management API's except getAvailableCredentialStorages() API. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // manage Credential Storage int result = ucmMgr.manageCredentialStorage(cs, true); // unmanage Credential Storage result = ucmMgr.manageCredentialStorage(cs, false); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // manage Credential Storage int result = ucmMgr.manageCredentialStorage(cs, true); // unmanage Credential Storage result = ucmMgr.manageCredentialStorage(cs, false); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to remove exempted application(s) related to Credential storage.
cs | Credential Storage of plugin |
---|---|
type | UCM_EXEMPT_TYPE_AUTH |
list | AppIdentity list remove |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to remove exempt application(s) related to Credential storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to remove whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential Storage.
cs | Credential Storage of plugin |
---|---|
list | AppIdentity list to remove |
extras | bundle for whitelist type |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to remove whitelisted application(s) which are allowed to use Credential storage or access Certificate stored in Credential Storage. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to set the Authentication type for Credential storage.
cs | Credential Storage of plugin |
---|---|
type | authentication type |
UCM_SUCCESS
if success. Error codes otherwise : Please see
SecurityException | If caller does not have required permissions |
---|
Configurator can use this API to set Authentication type for Credential storage. Configurator can use |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int status = ucmMgr.setAuthType(cs, UCM_AUTH_TYPE_LOCKED); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int status = ucmMgr.setAuthType(cs, UCM_AUTH_TYPE_LOCKED); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to send properties to Credential Storage.
cs | Credential Storage of plugin |
---|---|
property | options that send to plugin |
SecurityException | If caller does not have required permissions |
---|
An configurator can use this API to send properties to Credential Storage. This api depends on the implementation of plugin. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // Cache pin till keyguard timeout Bundle data = new Bundle(); data.putInt(BUNDLE_EXTRA_PIN_CACHE, PIN_CACHE_KEYGUARD_TIMEOUT); Bundle result = ucmMgr.setCredentialStorageProperty(cs, data); // Cache pin till timeout data = new Bundle(); data.putInt(BUNDLE_EXTRA_PIN_CACHE, PIN_CACHE_TIMEOUT); data.putInt(BUNDLE_EXTRA_PIN_CACHE_TIMEOUT_MINUTES, 10); result = ucmMgr.setCredentialStorageProperty(cs, data); //Allow packages to access Credential storage in the background even after pin caching timeout. List |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; // Cache pin till keyguard timeout Bundle data = new Bundle(); data.putInt(BUNDLE_EXTRA_PIN_CACHE, PIN_CACHE_KEYGUARD_TIMEOUT); Bundle result = ucmMgr.setCredentialStorageProperty(cs, data); // Cache pin till timeout data = new Bundle(); data.putInt(BUNDLE_EXTRA_PIN_CACHE, PIN_CACHE_TIMEOUT); data.putInt(BUNDLE_EXTRA_PIN_CACHE_TIMEOUT_MINUTES, 10); result = ucmMgr.setCredentialStorageProperty(cs, data); //Allow packages to access Credential storage in the background even after pin caching timeout. List |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 20 |
KNOX 2.7 |
User Scope |
API to set maximum length of KeyguardPIN.
cs | Credential Storage of plugin |
---|---|
maximumPinLength | maximum Pin Length which UCM smartCard allows |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to set condition about length of PIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.setKeyguardPinMaximumLength(cs, maximumPinLength); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.setKeyguardPinMaximumLength(cs, maximumPinLength); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
initKeyguardPin(CredentialStorage, String, Bundle)
setKeyguardPinMaximumRetryCount(CredentialStorage, int)
setKeyguardPinMinimumLength(CredentialStorage, int)
getKeyguardPinMinimumLength(CredentialStorage)
getKeyguardPinMaximumLength(CredentialStorage)
changeKeyguardPin(CredentialStorage, String, String)
API to set maximum retry count of Credential Storage Keyguard.
cs | Credential Storage of plugin |
---|---|
retryCount | retry count which UCM smartCard allows |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to set maximum retry count of Credential Storage Keyguard.. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.setKeyguardPinMaximumRetryCount(cs, retryCount); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.setKeyguardPinMaximumRetryCount(cs, retryCount); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |
API to set minimum Length of KeyguardPIN.
cs | Credential Storage of plugin |
---|---|
minimumPinLength | minimum Pin Length which UCM smartCard allows |
UCM_SUCCESS
if success. Error codes otherwise : Please see
ERROR_UCM_FAILURE
ERROR_UCM_STORAGE_NOT_SUPPORT
, if storage(plugin/smartCard) doesn't support this functionSecurityException | If caller does not have required permissions. |
---|
Configurator can use this API to set condition about length of PIN. |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.setKeyguardPinMinimumLength(cs, minimumPinLength); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
UniversalCredentialManager ucmMgr = UniversalCredentialManager.getUCMManager(mContext, containerID); try { CredentialStorage cs = new CredentialStorage(); cs.name = "Vendor Credential Storage Name"; cs.packageName = "com.mycompany.ucm.plugin"; int result = ucmMgr.setKeyguardPinMinimumLength(cs, minimumPinLength); } catch (SecurityException e) { Log.w(TAG, "SecurityException: " + e); } |
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_UCM_MGMT" permission which has a protection level of signature. |
API level 37 |
KNOX 3.10 |
Global Scope |