Since: API level 17
public class

SystemManager

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.custom.SystemManager

Class Overview

This class provides APIs to control system behavior for systems that can normally not be accessed.
The API will return ERROR_FAIL, if the API fails for an unknown reason or because the service was not available.

NOTE: Since version 2.5, the architecture of the SDK changed.
Now, all APIs are members of different classes according to their permission type. (APIs with permission type KNOX_CUSTOM_PROKIOSK, KNOX_CUSTOM_SETTING & KNOX_CUSTOM_SYSTEM are placed in ProKioskManager, SettingsManager & SystemManager classes respectively).
Additionally, a main interface class has been created, CustomDeviceManager, which allows public access to the above classes and provides some utility APIs.

Since
API level 17
Version 2.5

Summary

Public Methods
int addAutoCallNumber(String number, int delay, int answerMode)
This method adds or updates a number in the auto call pickup list.
int addPackagesToUltraPowerSaving(List<String> packages)
Deprecated in API level 36
NOTE: This API is not available since android 13.
int addShortcut(int page, int posX, int posY, String packageName)
This method adds an application shortcut to the specified screen at the position provided.
int addWidget(int page, int posX, int posY, int sizeX, int sizeY, String packageName)
This method adds a widget to the specified screen at the position and size provided.
int clearAnimation(int mode)
This method clears the device boot or shutdown animation.
int deleteHomeScreenPage(int page)
This method removes the specified homescreen page.
int dialEmergencyNumber(String phoneNumber)
This method dials an emergency number without the user needing to confirm it.
int getAccessibilitySettingsItems()
Deprecated in API level 37
List<String> getAppBlockDownloadNamespaces()
Deprecated in API level 30
NOTE: This API is not available since android 14.
boolean getAppBlockDownloadState()
Deprecated in API level 30
NOTE: This API is not available since android 14.
int getAppsButtonState()
Deprecated in API level 30
NOTE: This API is not available since android 14.
int getAutoCallNumberAnswerMode(String number)
This method gets the auto call pickup answer mode for the given number.
int getAutoCallNumberDelay(String number)
This method gets the auto call pickup delay for the given number.
List<String> getAutoCallNumberList()
This method gets the list of numbers to be answered by the Auto Call Pickup facility.
int getAutoCallPickupState()
This method gets the device's auto call pickup state.
boolean getAutoRotationState()
Deprecated in API level 27
NOTE: This API is not available since android 14.
StatusbarIconItem getBatteryLevelColourItem()
Deprecated in API level 30
NOTE: This API is not available since android 14.
int getCallScreenDisabledItems()
Deprecated in API level 37
boolean getChargerConnectionSoundEnabledState()
Deprecated in API level 30
NOTE: This API is not available since android 14.
boolean getDeviceSpeakerEnabledState()
This method gets the state of the device loud speaker.
boolean getDisplayMirroringState()
Deprecated in API level 37
boolean getExtendedCallInfoState()
Deprecated in API level 30
NOTE: This API is not available since android 14.
String getFavoriteApp(int position)
This method gets the package name of the application at the specified position in the favorites bar.
int getFavoriteAppsMaxCount()
This method gets the maximum number of apps allowed in the favorite bar.
int getForceAutoShutDownState()
This method gets the Force Auto Shutdown value.
int getForceAutoStartUpState()
This method gets the Force Auto Start Up value.
boolean getGearNotificationState()
Deprecated in API level 30
NOTE: This API is not available since android 14.
int getHardKeyBlockState(int keyCode, int reportType)
Deprecated in API level 35
int getHardKeyIntentBroadcast(int keyCode, int reportType)
This method gets the state of hard key intent broadcasting.
int getHardKeyIntentState()
Deprecated in API level 36
int getHardKeyIntentState(int keyCode, int reportType)
Deprecated in API level 35
int getHomeScreenMode()
Deprecated in API level 37
boolean getInfraredState()
Deprecated in API level 27
NOTE: This API is not available since android 14.
boolean getKeyboardMode(int mode)
This method checks the given keyboard mode.
int getKeyboardMode()
Deprecated in API level 28
boolean getLcdBacklightState()
Deprecated in API level 37
int getLockScreenHiddenItems()
This method gets the currently hidden UI elements in the lock screen on the device.
int getLockScreenOverrideMode()
Deprecated in API level 27
NOTE: This API is not available since android 14.
String getLockScreenShortcut(int shortcut)
This method gets the package name for a lock screen shortcut.
String getMacAddress()
Deprecated in API level 33
int getMobileNetworkType()
Deprecated in API level 33
NOTE: This API is not available since android 11.
List<PowerItem> getPowerDialogCustomItems()
This method gets the custom items currently set for power dialog option.
boolean getPowerDialogCustomItemsState()
Return the current status of the power dialog custom items.
boolean getPowerMenuLockedState()
Deprecated in API level 37
int getQuickPanelButtons()
This method gets the quick panel button visibility.
int getQuickPanelEditMode()
This method gets the quick panel edit state.
List<Integer> getQuickPanelItems()
This method gets the quick panel items.
String getRecentLongPressActivity()
Deprecated in API level 37
int getRecentLongPressMode()
Deprecated in API level 37
boolean getScreenOffOnHomeLongPressState()
Deprecated in API level 37
boolean getScreenOffOnStatusBarDoubleTapState()
Deprecated in API level 37
int getScreenTimeout()
Deprecated in API level 36
int getSensorDisabled()
Deprecated in API level 27
NOTE: This API is not available since android 14.
boolean getStatusBarClockState()
This method gets the display state of the clock on the status bar.
boolean getStatusBarIconsState()
This method gets the display state of the notification icons on the status bar.
int getStatusBarMode()
This method gets the state of the status bar.
boolean getStatusBarNotificationsState()
This method gets the display state of Notifications and ability to expand the status bar.
String getStatusBarText()
This method gets the status bar text string.
int getStatusBarTextScrollWidth()
This method gets the scroll width of the status bar text.
int getStatusBarTextSize()
This method gets the status bar text string size.
int getStatusBarTextStyle()
This method gets the status bar text string style.
int getSystemSoundsEnabledState()
Deprecated in API level 37
boolean getToastEnabledState()
This method gets the state of display of toasts.
int getToastGravity()
Deprecated in API level 27
NOTE: This API is not available since android 14.
boolean getToastGravityEnabledState()
Deprecated in API level 27
NOTE: This API is not available since android 14.
int getToastGravityXOffset()
Deprecated in API level 27
NOTE: This API is not available since android 14.
int getToastGravityYOffset()
Deprecated in API level 27
NOTE: This API is not available since android 14.
boolean getToastShowPackageNameState()
Deprecated in API level 27
NOTE: This API is not available since android 14.
boolean getTorchOnVolumeButtonsState()
Deprecated in API level 27
NOTE: This API is not available since android 14.
List<String> getUltraPowerSavingPackages()
Deprecated in API level 36
NOTE: This API is not available since android 13.
boolean getUnlockSimOnBootState()
Deprecated in API level 37
int getUsbConnectionType()
This method gets the current USB connection type.
boolean getUsbMassStorageState()
This method gets the USB mass storage (MTP) state when the device is connected to a PC.
String getUsbNetAddress(int addressType)
Deprecated in API level 35
boolean getUsbNetState()
Deprecated in API level 35
int getUserInactivityTimeout()
This method gets the user inactivity timeout value in seconds.
int getVibrationIntensity(int mode)
This method gets the vibration intensity.
boolean getVolumeButtonRotationState()
Deprecated in API level 27
NOTE: This API is not available since android 14.
int getVolumeControlStream()
Deprecated in API level 30
NOTE: This API is not available since android 14.
boolean getVolumePanelEnabledState()
This method gets the state of the volume panel display.
int getWifiAutoSwitchDelay()
Deprecated in API level 33
NOTE: This API is not available since android 11.
boolean getWifiAutoSwitchState()
Deprecated in API level 33
NOTE: This API is not available since android 11.
int getWifiAutoSwitchThreshold()
Deprecated in API level 33
NOTE: This API is not available since android 11.
int getWifiHotspotEnabledState()
Deprecated in API level 33
NOTE: This API is not available since android 11.
int getZeroPageState()
This method gets the launcher's zero page state.
int powerOff()
This method powers off the device.
int removeAutoCallNumber(String number)
This method removes a number from the auto call pickup list.
int removeFavoriteApp(int position)
This method removes the application at the specified position in the favorite bar.
int removeLockScreen()
Deprecated in API level 27
NOTE: This API is not available since android 14.
int removePackagesFromUltraPowerSaving(List<String> packages)
Deprecated in API level 36
NOTE: This API is not available since android 13.
int removeShortcut(String packageName)
This method removes an application shortcut from the specified screen.
int removeWidget(String packageName)
This method removes a widget from the specified screen.
int sendDtmfTone(char tone, int duration)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setAccessibilitySettingsItems(int state, int elements)
Deprecated in API level 37
int setAppBlockDownloadNamespaces(List<String> namespaces)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setAppBlockDownloadState(boolean state)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setAppsButtonState(int state)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setAudioVolume(int audioStream, int volumeLevel)
This method sets the volume level of the specified stream.
int setAutoCallPickupState(int state)
This method enables or disables auto call pickup.
int setAutoRotationState(boolean state, int rotation)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setBatteryLevelColourItem(StatusbarIconItem batteryIconItem)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setBootingAnimation(ParcelFileDescriptor animationFD, ParcelFileDescriptor loopFD, ParcelFileDescriptor soundFD, int delay)
This method configures device boot animation.
int setBrowserHomepage(String url)
This method sets the browser homepage.
int setCallScreenDisabledItems(boolean status, int elements)
Deprecated in API level 37
int setChargerConnectionSoundEnabledState(boolean state)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setDeviceSpeakerEnabledState(boolean state)
This method turns on/off the device loud speaker.
int setDisplayMirroringState(boolean state)
Deprecated in API level 37
int setExtendedCallInfoState(boolean state)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setFavoriteApp(String packageName, int position)
This method sets the application at the specified position in the favorite bar.
int setForceAutoShutDownState(int mode)
This method turns on/off the Force Auto Shutdown feature.
int setForceAutoStartUpState(int state)
This method turns on/off the Force Auto Start Up feature.
int setGearNotificationState(boolean state)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setHardKeyIntentBroadcast(boolean state, int keyCode, int reportType, Intent intent, String setPackage, boolean deviceWide)
This method turns on/off hard key intent broadcasting.
int setHardKeyIntentState(int state, int keyCode, int reportType, int block)
Deprecated in API level 35
int setHardKeyIntentState(int state)
Deprecated in API level 35
int setHomeScreenMode(int mode)
Deprecated in API level 37
int setInfraredState(boolean state)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setKeyboardMode(int mode)
This method sets the Keyboard mode to Normal, Prediction Off or No Settings.
int setLcdBacklightState(boolean state)
Deprecated in API level 37
int setLockScreenHiddenItems(boolean status, int elements)
This method hides or shows lock screen UI elements on the device.
int setLockScreenOverrideMode(int mode)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setLockScreenShortcut(int shortcut, String packageName)
This method sets the package name for a lock screen shortcut.
int setMobileNetworkType(int type)
Deprecated in API level 33
NOTE: This API is not available since android 11.
int setMultiWindowState(boolean state)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setPowerDialogCustomItems(List<PowerItem> item)
This method sets the power dialog custom items, this will clear previously assigned items.
int setPowerDialogCustomItemsState(boolean state)
This method turns on/off the power dialog custom items.
int setPowerMenuLockedState(boolean state)
Deprecated in API level 37
int setQuickPanelButtons(int buttons)
This method sets the quick panel button visibility.
int setQuickPanelEditMode(int mode)
This method turns on/off editing of the quick panel items.
int setQuickPanelItems(List<Integer> items)
This method sets the list of items in the quick panel.
int setRecentLongPressActivity(String packageName)
Deprecated in API level 37
int setRecentLongPressMode(int mode)
Deprecated in API level 37
int setScreenOffOnHomeLongPressState(boolean state)
Deprecated in API level 37
int setScreenOffOnStatusBarDoubleTapState(boolean state)
Deprecated in API level 37
int setScreenTimeout(int timeout)
Deprecated in API level 35
int setSensorDisabled(boolean status, int elements)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setShuttingDownAnimation(ParcelFileDescriptor animationFD, ParcelFileDescriptor soundFD)
This method configures device shutdown animation.
int setStatusBarClockState(boolean state)
This method shows or hides the display of the clock on the status bar.
int setStatusBarIconsState(boolean state)
This method shows or hides the display of the notification icons on the status bar.
int setStatusBarMode(int mode)
This method shows or hides the status bar.
int setStatusBarNotificationsState(boolean state)
This method shows or hides the display of Notifications and ability to expand the status bar.
int setStatusBarText(String text, int style, int size)
This method sets status bar text, including text style and size.
int setStatusBarTextScrollWidth(String text, int style, int size, int scrollwidth)
This method sets status bar text, including text style, size and scroll width.
int setSystemRingtone(int ringToneType, String ringToneName)
This method sets the specified ringtone or notification tone to the ringtone name specified.
int setSystemSoundsEnabledState(int state, int elements)
Deprecated in API level 37
int setSystemSoundsSilent()
Deprecated in API level 35
int setToastEnabledState(boolean state)
This method turns on/off the display of toasts.
int setToastGravity(int gravity, int x, int y)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setToastGravityEnabledState(boolean state)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setToastShowPackageNameState(boolean state)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setTorchOnVolumeButtonsState(boolean state)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setUnlockSimOnBootState(boolean state)
Deprecated in API level 37
int setUnlockSimPin(String pin)
Deprecated in API level 37
int setUsbConnectionType(int type)
This method sets the USB connection type.
int setUsbMassStorageState(boolean state)
This method turns on/off USB mass storage (MTP) when the device is connected to a PC.
int setUsbNetAddresses(String sourceAddress, String destinationAddress)
Deprecated in API level 35
int setUsbNetState(boolean status)
Deprecated in API level 35
int setUserInactivityTimeout(int timeout)
This method sets the timeout for user inactivity to the specified number of seconds.
int setVibrationIntensity(int mode, int value)
This method sets the vibration intensity.
int setVolumeButtonRotationState(boolean state)
Deprecated in API level 27
NOTE: This API is not available since android 14.
int setVolumeControlStream(int streamType)
Deprecated in API level 30
NOTE: This API is not available since android 14.
int setVolumePanelEnabledState(boolean state)
This method turns on/off the volume panel display.
int setWifiAutoSwitchDelay(int delay)
Deprecated in API level 33
NOTE: This API is not available since android 11.
int setWifiAutoSwitchState(boolean state)
Deprecated in API level 33
NOTE: This API is not available since android 11.
int setWifiAutoSwitchThreshold(int threshold)
Deprecated in API level 33
NOTE: This API is not available since android 11.
int setWifiHotspotEnabledState(int state)
Deprecated in API level 33
NOTE: This API is not available since android 11.
int setZeroPageState(int state)
This method sets the launcher's zero page state.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int addAutoCallNumber (String number, int delay, int answerMode)

Since: API level 20

This method adds or updates a number in the auto call pickup list.

Parameters
number The phone number to be added. delay The delay in seconds (1-30), or 0 for immediate pickup. answerMode ANSWER_MODE_DEFAULT or ANSWER_MODE_SPEAKER
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.addAutoCallNumber("+441784428600", 5, CustomDeviceManager.ANSWER_MODE_DEFAULT);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int addPackagesToUltraPowerSaving (List<String> packages)

Since: API level 17

Deprecated in API level 36
NOTE: This API is not available since android 13.

This method sets the list of additional apps to be made available in Ultra Power Saving Mode.
NOTE: Errors are only returned if a list item is not a syntactically valid package name. A package which does not exist, or which has no launch activity, will be accepted in the app list, but will simply be ignored in Ultra Power Saving Mode.

Parameters
packages The list of apps (can be empty or null).
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     ArrayList appList = new ArrayList();
     appList.add("com.android.mms");
     appList.add("com.android.contacts");
     appList.add("com.android.chrome");
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if( kcsm.addPackagesToUltraPowerSaving(appList) != CustomDeviceManager.SUCCESS ) {
         Log.d(TAG, "set Ultra Power Saving Mode app list failed");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int addShortcut (int page, int posX, int posY, String packageName)

Since: API level 23

This method adds an application shortcut to the specified screen at the position provided.

Parameters
page The home screen to place the shortcut onto.
posX The x position of the shortcut.
posY The y position of the shortcut.
packageName The package of the required shortcut.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.addShortcut(0, 0, 0, "com.android.chrome/com.google.apps.chrome.Main");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int addWidget (int page, int posX, int posY, int sizeX, int sizeY, String packageName)

Since: API level 23

This method adds a widget to the specified screen at the position and size provided.

Parameters
page The home screen to place the widget onto.
posX The x position of the widget.
posY The y position of the widget.
sizeX The width of the widget.
sizeY The height of the widget.
packageName The package of the required widget.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     String widgetPackage = "com.example.widget";
     String widgetProvider = ".WidgetProvider";
     kcsm.addWidget(0, 0, 0, 3, 1, widgetPackage + "/" + widgetProvider);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int clearAnimation (int mode)

Since: API level 19

This method clears the device boot or shutdown animation.

Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.clearAnimation(CustomDeviceManager.ANIMATION_MODE_STARTUP);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int deleteHomeScreenPage (int page)

Since: API level 23

This method removes the specified homescreen page.

Parameters
page The home screen page to be deleted.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.deleteHomeScreenPage(1);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int dialEmergencyNumber (String phoneNumber)

Since: API level 17

This method dials an emergency number without the user needing to confirm it.

Parameters
phoneNumber The phone number to be dialled.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.dialEmergencyNumber("999");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.0
Multiuser Environment
Global Scope

public int getAccessibilitySettingsItems ()

Since: API level 19

Deprecated in API level 37

This method gets the currently turned on accessibility settings on the device.

Returns
  • The turned on elements as a mask.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int elements = kcsm.getAccessibilitySettingsItems();
 Log.d("Answer call on home button: " + (((elements & CustomDeviceManager.ACCESSIBILITY_ANSWER_CALL_ON_HOME) != 0) ? "enabled" : "disabled"));
 Log.d("End call on power button: " + (((elements & CustomDeviceManager.ACCESSIBILITY_END_CALL_ON_POWER) != 0) ? "enabled" : "disabled"));
 // etc.
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public List<String> getAppBlockDownloadNamespaces ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the list of namespaces blocked by the application block download functionality.

Returns
  • List of namespaces blocked by the application block download functionality.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 List namespaces = kcsm.getAppBlockDownloadNamespaces();
 for(String item : namespaces) {
     Log.d(TAG, "Namespace blocked: " + item);
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getAppBlockDownloadState ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the state of the application block download functionality.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getAppBlockDownloadState()) {
     Log.d(TAG, "Downloading of specified Apps is blocked");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getAppsButtonState ()

Since: API level 23

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the application drawer button state.

Returns
  • SHOW The applications button is visible.
    HIDE The applications button is hidden.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if(kcsm.getAppsButtonState() == CustomDeviceManager.HIDE {
     Log.d(TAG, "Apps button is hidden");
 }
 
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int getAutoCallNumberAnswerMode (String number)

Since: API level 20

This method gets the auto call pickup answer mode for the given number.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int mode = kcsm.getAutoCallNumberAnswerMode(number);
 if(mode != CustomDeviceManager.NOT_FOUND) {
     String modeStr = (mode == CustomDeviceManager.ANSWER_MODE_DEFAULT ? "default" : "speaker");
     Log.d(TAG, "Auto call pickup answer mode = " + modeStr);
 }
 
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int getAutoCallNumberDelay (String number)

Since: API level 20

This method gets the auto call pickup delay for the given number.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int delay = kcsm.getAutoCallNumberDelay(number);
 if(delay != CustomDeviceManager.NOT_FOUND) {
     Log.d(TAG, "Auto call pickup delay = " + delay + " sec");
 }
 
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public List<String> getAutoCallNumberList ()

Since: API level 20

This method gets the list of numbers to be answered by the Auto Call Pickup facility.

Returns
  • List of numbers, or null.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 List numbers = kcsm.getAutoCallNumberList();
 for(String item : numbers) {
     Log.d(TAG, "Number: " + item);
 }
 
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int getAutoCallPickupState ()

Since: API level 20

This method gets the device's auto call pickup state.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getAutoCallPickupState() == CustomDeviceManager.ON) {
     Log.d(TAG, "Auto call pickup is enabled");
 }
 
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public boolean getAutoRotationState ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the auto-rotation state of the device.

Returns
  • true if on, false if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getAutoRotationState()) {
     Log.d(TAG, "Auto Rotation is on");
 }
 
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public StatusbarIconItem getBatteryLevelColourItem ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the battery level color item which contains list of battery attribute levels and colors.

Returns
  • The battery level color items.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 StatusbarIconItem batteryLevelColorItem = kcsm.getBatteryLevelColourItem();
 if (batteryLevelColorItem != null) {
     StatusbarIconItem.AttributeColour[] batteryColorsArray = batteryLevelColorItem.getAttributeColourArray();
     for (StatusbarIconItem.AttributeColour item : batteryColorsArray) {
         Log.d(TAG, "Level:" + item.getAttribute() + "% color: 0x" + Integer.toHexString(item.getColour()));
     }
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getCallScreenDisabledItems ()

Since: API level 17

Deprecated in API level 37

This method gets the currently turned off UI elements in the call screen on the device.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int elements = kcsm.getCallScreenDisabledItems();
 Log.d("Speaker: " + (((elements & CustomDeviceManager.CALL_SCREEN_INCALL_SPEAKER) != 0) ? "disabled" : "enabled"));
 Log.d("Bluetooth: " + (((elements & CustomDeviceManager.CALL_SCREEN_INCALL_BLUETOOTH) != 0) ? "disabled" : "enabled"));
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getChargerConnectionSoundEnabledState ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the state of the charger connection sound.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getChargerConnectionSoundEnabledState()) {
     Log.d(TAG, "Charger connection sound is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getDeviceSpeakerEnabledState ()

Since: API level 17

This method gets the state of the device loud speaker.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getDeviceSpeakerEnabledState()) {
     Log.d(TAG, "Media sound is forced to device speaker");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getDisplayMirroringState ()

Since: API level 17

Deprecated in API level 37

This method gets the display mirroring state. The default value is false.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getDisplayMirroringState()) {
     Log.d(TAG, Display mirroring is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getExtendedCallInfoState ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the state of extended call info.

Returns
  • true if on, false if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getExtendedCallInfoState()) {
     Log.d(TAG, "Extended call info is on");
 }
 
Since
API level 17
Version 2.0
Multiuser Environment
Global Scope

public String getFavoriteApp (int position)

Since: API level 23

This method gets the package name of the application at the specified position in the favorites bar.

Returns
  • Package name of the specified favorite bar application or null if the position is invalid or the position is empty.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 Log.d(TAG, "Favorite application 0 is " + kcsm.getFavoriteApp(0));
 
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int getFavoriteAppsMaxCount ()

Since: API level 23

This method gets the maximum number of apps allowed in the favorite bar. The favorite bar is the bar at the bottom of the home screen that displays a list of shortcuts.

Returns
  • The number of entries in the favorite apps list.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int maxItems = kcsm.getFavoriteAppsMaxCount();
 
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int getForceAutoShutDownState ()

Since: API level 22

This method gets the Force Auto Shutdown value. The default value is NORMAL.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getForceAutoShutDownState() != CustomDeviceManager.NORMAL) {
     Log.d(TAG, "Force Auto Shutdown is on");
 }
 
Since
API level 22
Version 2.8
Multiuser Environment
Global Scope

public int getForceAutoStartUpState ()

Since: API level 19

This method gets the Force Auto Start Up value. The default value is off.

Returns
  • ON Auto start up is turned on.
    OFF Auto start up is turned off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getForceAutoStartUpState()) {
     Log.d(TAG, "Force Auto Startup is on");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getGearNotificationState ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the state of the ongoing notification on Status Bar when device is connected to Gear accessory.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getGearNotificationState()) {
     Log.d(TAG, "Gear Notification on Status Bar is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getHardKeyBlockState (int keyCode, int reportType)

Since: API level 29

Deprecated in API level 35

This method gets if hard key functionality will be blocked or not when hard key intent is reported.

NOTE: This API will return true if hard key functionality has been blocked using either KEY_ACTION_DOWN or KEY_ACTION_UP.

Parameters
keyCode KEYCODE_PTT PTT button key code.
KEYCODE_EMERGENCY Emergency button key code.
reportType KEY_ACTION_DOWN Key press.
KEY_ACTION_UP Key release.
Returns
  • ON The key functionality is blocked.
    OFF The key functionality is kept.
Usage
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if(kcsm.getHardKeyBlockState(KPCCManager.KEYCODE_PTT, CustomDeviceManager.KEY_ACTION_DOWN) == CustomDeviceManager.ON) {
          Log.d(TAG, "PTT key functionality is blocked");
     }
 
Since
API level 29
Version 3.4

public int getHardKeyIntentBroadcast (int keyCode, int reportType)

Since: API level 36

This method gets the state of hard key intent broadcasting.

Returns
  • ON The key report is on
    OFF The key report is off.
Usage
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if(kcsm.getHardKeyIntentState(KeyEvent.KEYCODE_HOME, CustomDeviceManager.KEY_ACTION_DOWN_UP) == CustomDeviceManager.ON) {
          Log.d(TAG, "Home key report is on when the key is pressed and released");
     }
 
Since
API level 36
Version 3.9

public int getHardKeyIntentState ()

Since: API level 24

Deprecated in API level 36

This method gets the state of hard key intent reporting.

Returns
  • ON Hard key intent is turned on.
    OFF Hard key intent is turned off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getHardKeyIntentState()) {
     Log.d(TAG, "Hard key intents are turned on");
 }
 
Since
API level 24
Version 3.0
Multiuser Environment
Global Scope

public int getHardKeyIntentState (int keyCode, int reportType)

Since: API level 29

Deprecated in API level 35

This method gets the state of hard key intent reporting.

Parameters
keyCode KEYCODE_PTT PTT button key code.
KEYCODE_EMERGENCY Emergency button key code.
reportType KEY_ACTION_DOWN Key press.
KEY_ACTION_UP Key release.
Returns
  • ON The key report is on
    OFF The key report is off.
Usage
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if(kcsm.getHardKeyIntentState(KPCCManager.KEYCODE_PTT, CustomDeviceManager.KEY_ACTION_DOWN) == CustomDeviceManager.ON) {
          Log.d(TAG, "PTT key report is on when the key is pressed");
     }
 
Since
API level 29
Version 3.4

public int getHomeScreenMode ()

Since: API level 24

Deprecated in API level 37

This method gets the home screen mode.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getHomeScreenMode() == SystemManager.HOME_SCREEN_ONLY) {
     Log.d(TAG, "All applications are displayed on the home screen");
 }
 
Since
API level 24
Version 3.0
Multiuser Environment
Global Scope

public boolean getInfraredState ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the state of the infrared transmitter.

Returns
  • true if turned on, false if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getInfraredState()) {
    Log.d(TAG, "Infrared is turned on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getKeyboardMode (int mode)

Since: API level 28

This method checks the given keyboard mode.

Returns
  • true if given mode is on, false if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getKeyboardMode(CustomDeviceManager.KEYBOARD_MODE_PREDICTION_OFF)) {
     Log.d(TAG, "Predictive text turned off");
 }
 
Since
API level 28
Version 3.3
Multiuser Environment
Global Scope

public int getKeyboardMode ()

Since: API level 17

Deprecated in API level 28

This method gets the Keyboard mode.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getKeyboardMode() == SystemManager.KEYBOARD_MODE_PREDICTION_OFF) {
     Log.d(TAG, "Predictive text turned off");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getLcdBacklightState ()

Since: API level 17

Deprecated in API level 37

This method gets the state of LCD Backlight.

Returns
  • true if LCD Backlight is on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getLcdBacklightState()) {
     Log.d(TAG, "LCD Backlight is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getLockScreenHiddenItems ()

Since: API level 17

This method gets the currently hidden UI elements in the lock screen on the device.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int elements = kcsm.getLockScreenHiddenItems();
 Log.d("Clock setting: " + (((elements & CustomDeviceManager.LOCK_SCREEN_CLOCK) != 0) ? "hidden" : "shown"));
 Log.d("Battery info setting: " + (((elements & CustomDeviceManager.LOCK_SCREEN_BATTERY_INFO) != 0) ? "hidden" : "shown"));
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getLockScreenOverrideMode ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the lock screen override mode.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getLockScreenOverrideMode() == CustomDeviceManager.LOCK_SCREEN_OVERRIDE_SWIPE) {
     Log.d(TAG, "Lock screen is overridden to Swipe");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public String getLockScreenShortcut (int shortcut)

Since: API level 20

This method gets the package name for a lock screen shortcut.

Parameters
shortcut BOTTOM_LEFT for left, BOTTOM_RIGHT for right
Returns
  • The package name.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 Log.d("Left shortcut: " + kcsm.getLockScreenShortcut(CustomDeviceManager.BOTTOM_LEFT));
 
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public String getMacAddress ()

Since: API level 20

Deprecated in API level 33

This method returns the Mac address.
NOTE: A valid MAC address is returned only on Wi-Fi connection.

Returns
  • The MAC address.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 Log.d(TAG, "MAC Address: " + kcsm.getMacAddress();
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int getMobileNetworkType ()

Since: API level 19

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method gets the current mobile network type.

Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getMobileNetworkType() == CustomDeviceManager.NETWORK_TYPE_WCDMA_PREF) {
     Log.d(TAG, "Mobile network type is WCDMA_PREF");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public List<PowerItem> getPowerDialogCustomItems ()

Since: API level 19

This method gets the custom items currently set for power dialog option.

Returns
  • The list of custom items.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 ArrayList list = kcsm.getPowerDialogCustomItems();
 for (PowerItem item : list) {
     Log.d(TAG, "Text:"+ item.getText());
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getPowerDialogCustomItemsState ()

Since: API level 19

Return the current status of the power dialog custom items.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getPowerDialogCustomItemsState()) {
     Log.d(TAG, "Custom items  on");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getPowerMenuLockedState ()

Since: API level 17

Deprecated in API level 37

This method gets the state of the power menu when the device is locked.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getPowerMenuLockedState()) {
     Log.d(TAG, "Power menu is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getQuickPanelButtons ()

Since: API level 19

This method gets the quick panel button visibility.

Returns
  • Bitmask containing the buttons that are visible.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if(kcsm.getQuickPanelButtons() & CustomDeviceManager.QUICK_PANEL_BUTTON_S_FINDER) {
     Log.d(TAG, "S Finder button is visible");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int getQuickPanelEditMode ()

Since: API level 19

This method gets the quick panel edit state.

Returns
  • ON if turned on, OFF if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getQuickPanelEditMode() == CustomDeviceManager.ON) {
     Log.d(TAG, "Quick panel editing is on");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public List<Integer> getQuickPanelItems ()

Since: API level 19

This method gets the quick panel items.

Returns
  • list of integers specifying the current quick panel items.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 List items = kcsm.getQuickPanelItems();
 for(Integer item : items) {
     if(item == CustomDeviceManager.QUICK_PANEL_WIFI) {
         Log.d(TAG, "Wi-Fi is present");
     }
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public String getRecentLongPressActivity ()

Since: API level 17

Deprecated in API level 37

This method gets the package that will be started when the Recent hardware button is long-pressed.

Returns
  • The package name string (or null if the package has not been set).
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 String longPressActivity = kcsm.getRecentLongPressActivity();
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getRecentLongPressMode ()

Since: API level 17

Deprecated in API level 37

This method gets operation mode of long-pressing the Recent hardware button.

Returns
  • One of:
    RECENT_LONGPRESS_OFF The button operates in the default manner.
    RECENT_LONGPRESS_HOME The button starts the specified activity when the home application is the current application.
    RECENT_LONGPRESS_GLOBAL The button starts the specified activity whenever the button is long-pressed regardless of the current application.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getRecentLongPressMode() == CustomDeviceManager.RECENT_LONGPRESS_HOME) {
     Log.d(TAG, "The Recent button will start the activity only for the launcher.");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getScreenOffOnHomeLongPressState ()

Since: API level 17

Deprecated in API level 37

This method gets the state of Screen Off on HOME long press.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getScreenOffOnHomeLongPressState()) {
     Log.d(TAG, "Screen Off is turned on on HOME long press");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getScreenOffOnStatusBarDoubleTapState ()

Since: API level 17

Deprecated in API level 37

This method gets the state of Screen Off on status bar double tap.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getScreenOffOnStatusBarDoubleTapState()) {
     Log.d(TAG, "Screen Off is turned on on status bar double tap");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getScreenTimeout ()

Since: API level 17

Deprecated in API level 36

This method gets the screen timeout in seconds.

Returns
  • The screen timeout in seconds.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int screenTimeout = kcsm.getScreenTimeout();
 
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int getSensorDisabled ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the hardware sensors which are currently off.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int elements = kcsm.getSensorDisabled();
 Log.d("Accelerometer: " + (((elements & CustomDeviceManager.SENSOR_ACCELEROMETER) != 0) ? "disabled" : "enabled"));
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getStatusBarClockState ()

Since: API level 19

This method gets the display state of the clock on the status bar. The default status bar icon state is true (show).

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarClockState()) {
     Log.d(TAG, "Clock is shown on status bar");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getStatusBarIconsState ()

Since: API level 19

This method gets the display state of the notification icons on the status bar. The default status bar icon state is true (show).

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarIconsState()) {
     Log.d(TAG, "Icons are shown on status bar");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int getStatusBarMode ()

Since: API level 19

This method gets the state of the status bar. The default status bar mode is SHOW.

Returns
  • SHOW The status bar is shown (but not usable).
    HIDE The status bar is hidden.
    DEFAULT The status bar is in its default state.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarMode() == CustomDeviceManager.HIDE) {
     Log.d(TAG, "Status bar is hidden");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getStatusBarNotificationsState ()

Since: API level 19

This method gets the display state of Notifications and ability to expand the status bar. The default status bar Notifications state is true (show).

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarNotificationsState()) {
     Log.d(TAG, "Notifications are shown on status bar");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public String getStatusBarText ()

Since: API level 17

This method gets the status bar text string.

Returns
  • Text string to be displayed on status bar or null.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 String text = kcsm.getStatusBarText();
 Log.d(TAG, "Status bar text  is: " + text);
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getStatusBarTextScrollWidth ()

Since: API level 17

This method gets the scroll width of the status bar text.

Returns
  • Text scroll width in dip or USE_DEFAULT for system default value.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarTextScrollWidth() > CustomDeviceManager.USE_DEFAULT) {
     Log.d(TAG, "Status Bar text scrolling  on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getStatusBarTextSize ()

Since: API level 17

This method gets the status bar text string size.

Returns
  • Text size in dip or USE_DEFAULT for system default value.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarTextSize() != CustomDeviceManager.USE_DEFAULT) {
     Log.d(TAG, "Custom Status Bar text size specified");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getStatusBarTextStyle ()

Since: API level 17

This method gets the status bar text string style.

Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getStatusBarTextStyle() != CustomDeviceManager.USE_DEFAULT) {
     Log.d(TAG, "Custom Status Bar text style specified");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getSystemSoundsEnabledState ()

Since: API level 19

Deprecated in API level 37

This method gets the currently turned on system sounds on the device.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int elements = kcsm.getSystemSoundsEnabledState();
 Log.d("DTMF when dialing: " + (((elements & CustomDeviceManager.SYSTEM_SOUNDS_DTMF_DIALING) != 0) ? "enabled" : "disabled"));
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getToastEnabledState ()

Since: API level 17

This method gets the state of display of toasts.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getToastEnabledState()) {
     Log.d(TAG, "Toasts are  on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getToastGravity ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the value of the custom toast gravity.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getToastGravity() & Gravity.LEFT) {
     Log.d(TAG, "Custom toast gravity is left-oriented");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getToastGravityEnabledState ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the state of custom toast gravity.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getToastGravityEnabledState()) {
     Log.d(TAG, "Custom toast gravity is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getToastGravityXOffset ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the value of the custom toast gravity X offset.

Returns
  • The gravity X offset.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int x = kcsm.getToastGravityXOffset();
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getToastGravityYOffset ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the value of the custom toast gravity Y offset.

Returns
  • The gravity Y offset.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int y = kcsm.getToastGravityYOffset();
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getToastShowPackageNameState ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the state of display of package names on toasts.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getToastShowPackageNameState()) {
     Log.d(TAG, "Package names on toasts are  on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getTorchOnVolumeButtonsState ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the state of the torch on the Volume buttons.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getTorchOnVolumeButtonsState()) {
     Log.d(TAG, "Torch on Volume buttons is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public List<String> getUltraPowerSavingPackages ()

Since: API level 17

Deprecated in API level 36
NOTE: This API is not available since android 13.

This method gets the list of additional apps available in Ultra Power Saving Mode.
NOTE: Returned list contain package name along with the default activity. e.g. com.sec.chanon.HomeActivity

Returns
  • The list of applications additional apps available in Ultra Power Saving Mode. This list will be null, if not set.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 List list = kcsm.getUltraPowerSavingPackages();
 for(String item : list) {
     Log.d(TAG, "App name: " + item);
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getUnlockSimOnBootState ()

Since: API level 17

Deprecated in API level 37

This method gets the SIM unlock on boot state.

Returns
  • true if the SIM is set to unlock on Boot, false if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getUnlockSimOnBootState()) {
     Log.d(TAG, "SIM unlock is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getUsbConnectionType ()

Since: API level 20

This method gets the current USB connection type.

Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getUsbConnectionType() == CustomDeviceManager.USB_CONNECTION_TYPE_MTP_ADB) {
     Log.d(TAG, "USB connection type is USB_CONNECTION_TYPE_MTP_ADB");
 }
 
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public boolean getUsbMassStorageState ()

Since: API level 17

This method gets the USB mass storage (MTP) state when the device is connected to a PC.

Returns
  • true if the device acts as a mass storage device, false if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getUsbMassStorageState()) {
     Log.d(TAG, "USB mass storage (MTP) is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public String getUsbNetAddress (int addressType)

Since: API level 17

Deprecated in API level 35

This method gets the source or destination IP address for the USB Net functionality. The function returns null if the address has not been set.

Parameters
addressType The address to retrieve: SOURCE_ADDRESS or DESTINATION_ADDRESS.
Returns
  • IP Address string for specified addressType.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 String sourceAddress = kcsm.getUsbNetAddress(CustomDeviceManager.SOURCE_ADDRESS);
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getUsbNetState ()

Since: API level 17

Deprecated in API level 35

This method gets the USB Net functionality state when. By default, the USB Net state is turned off.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getUsbNetState()) {
     Log.d(TAG, "USB Net functionality is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getUserInactivityTimeout ()

Since: API level 17

This method gets the user inactivity timeout value in seconds. The default value for the user inactivity timeout is zero (0) seconds, which disables the timer.

Returns
  • User inactivity timeout value in seconds.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int userInactivityTimeout = kcsm.getUserInactivityTimeout();
 
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int getVibrationIntensity (int mode)

Since: API level 19

This method gets the vibration intensity.

Parameters
mode Vibration type to get: VIBRATION_CALL or VIBRATION_NOTIFICATION or VIBRATION_SYSTEM.
Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 int val = kcsm.getVibrationIntensity(CustomDeviceManager.VIBRATION_CALL);
 Log.d(TAG, "Vibration intensity for Call is " + val);
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public boolean getVolumeButtonRotationState ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method gets the state of volume button rotation.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getVolumeButtonRotationState()) {
     Log.d(TAG, "Volume button rotation is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getVolumeControlStream ()

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method gets the current volume control stream.

Returns
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getVolumeControlStream() == CustomDeviceManager.VOLUME_CONTROL_STREAM_NOTIFICATION) {
     Log.d(TAG, "Volume control stream is set to Notification");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getVolumePanelEnabledState ()

Since: API level 17

This method gets the state of the volume panel display.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getVolumePanelEnabledState()) {
    Log.d(TAG, "Volume Panel is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getWifiAutoSwitchDelay ()

Since: API level 17

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method gets the Wi-Fi auto switching delay in seconds.

Returns
  • The Wi-Fi auto switching threshold delay.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 Log.d(TAG, "Wi-Fi auto switching delay is: " + kcsm.getWifiAutoSwitchDelay());
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public boolean getWifiAutoSwitchState ()

Since: API level 17

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method get the Wi-Fi auto switching state.

Returns
  • true if on, false if off.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getWifiAutoSwitchState()) {
     Log.d(TAG, "Wi-Fi auto switching is on");
 }
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getWifiAutoSwitchThreshold ()

Since: API level 17

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method get the Wi-Fi auto switching threshold.

Returns
  • The Wi-Fi auto switching threshold signal strength.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 Log.d(TAG, "Wi-Fi auto switching threshold is: " + kcsm.getWifiAutoSwitchThreshold());
 
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int getWifiHotspotEnabledState ()

Since: API level 19

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method gets the device's mobile hotspot state.

Returns
  • ON if turned on, OFF if not.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if (kcsm.getWifiHotspotEnabledState() == CustomDeviceManager.ON) {
     Log.d(TAG, "Mobile hotspot is on");
 }
 
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int getZeroPageState ()

Since: API level 23

This method gets the launcher's zero page state.

Returns
  • SHOW The launcher zero page is visible.
    HIDE The launcher zero page is hidden.
Usage
 CustomDeviceManager cdm = CustomDeviceManager.getInstance();
 SystemManager kcsm = cdm.getSystemManager();
 if(kcsm.getZeroPageState() == CustomDeviceManager.HIDE) {
     Log.d(TAG, "Zero page is hidden");
 }
 
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int powerOff ()

Since: API level 20

This method powers off the device.

Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.powerOff();
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int removeAutoCallNumber (String number)

Since: API level 20

This method removes a number from the auto call pickup list.

Parameters
number The phone number to be removed.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.removeAutoCallNumber("+441784428600");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int removeFavoriteApp (int position)

Since: API level 23

This method removes the application at the specified position in the favorite bar. This is the bar at the bottom of the home screen that displays a list of shortcuts.

Parameters
position The favorite application to remove from the list as a number from 0 to getFavoriteAppsMaxCount() -1.
Returns
  • SUCCESS Application was set successfully as a favorite.
    ERROR_NOT_FOUND There is no item at the specified position.
    ERROR_INVALID_VALUE The position is out of range (the range depends on the particular specification of the device).
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.removeFavoriteApp(0);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int removeLockScreen ()

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method removes the lock screen from the device (meaning that simply pressing the power or home button will restore the device).
NOTE: The lock screen is removed even if the user had previously setup a secure pattern or pass code.

Returns
  • SUCCESS The lock screen was successfully removed.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.removeLockScreen();
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int removePackagesFromUltraPowerSaving (List<String> packages)

Since: API level 17

Deprecated in API level 36
NOTE: This API is not available since android 13.

This method removes list of additional apps to be made available in Ultra Power Saving Mode.

Parameters
packages The list of apps.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     ArrayList appList = new ArrayList();
     appList.add("com.android.contacts");
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if( kcsm.removePackagesFromUltraPowerSaving(appList) != CustomDeviceManager.SUCCESS ) {
         Log.d(TAG, "remove package from Ultra Power Saving Mode list failed");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int removeShortcut (String packageName)

Since: API level 23

This method removes an application shortcut from the specified screen.

Parameters
packageName The package of the required shortcut.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.removeShortcut("com.android.chrome/com.google.apps.chrome.Main");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int removeWidget (String packageName)

Since: API level 23

This method removes a widget from the specified screen.

Parameters
packageName The package of the required widget.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     String widgetPackage = "com.example.widget";
     String widgetProvider = ".WidgetProvider";
     kcsm.removeWidget(widgetPackage + "/" + widgetProvider);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int sendDtmfTone (char tone, int duration)

Since: API level 19

Deprecated in API level 27
NOTE: This API is not available since android 14.

Start a call and then make a call to sendDtmfTone specifying the tone and the duration. The tone defines which key is being simulated (0-9, *, #) and the duration specifies how long the tone should be played for.
You should hear the tone played through the called phone for the specified length of time.

Parameters
tone The tone as a character ('0'..'9', '*' or '#')
duration The duration, between 100 and 5000 milliseconds
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.sendDtmfTone('*', 1000);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setAccessibilitySettingsItems (int state, int elements)

Since: API level 19

Deprecated in API level 37

This method turns on/off accessibility settings on the device.

Parameters
state ON to turn on the specified elements, OFF to turn off them.
elements Accessibility settings, as a combination of the following flags:
ACCESSIBILITY_ANSWER_CALL_ON_HOME |
ACCESSIBILITY_ANSWER_CALL_ON_VOICE |
ACCESSIBILITY_END_CALL_ON_POWER |
ACCESSIBILITY_NOTIFICATION_REMINDER |
ACCESSIBILITY_SINGLE_TAP_MODE |
ACCESSIBILITY_ALL (= all of the above)
NOTE: ACCESSIBILITY_ANSWER_CALL_ON_HOME is not supported on devices that do not have a physical home button.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAccessibilitySettingsItems(CustomDeviceManager.ON, CustomDeviceManager.ACCESSIBILITY_ANSWER_CALL_ON_HOME |
                                         CustomDeviceManager.ACCESSIBILITY_END_CALL_ON_POWER);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setAppBlockDownloadNamespaces (List<String> namespaces)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method set the namespaces blocked by the block download functionality.
NOTE: Passing "*" will block all the applications/services which are using the Android DownloadService.

Parameters
namespaces List of Application Package Namespaces to be blocked.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     ArrayList namespaces = new ArrayList();
     namespaces.add("test.app.namespace");
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAppBlockDownloadNamespaces(namespaces);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setAppBlockDownloadState (boolean state)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method turns on/off blocking of downloads of specified applications.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAppBlockDownloadState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setAppsButtonState (int state)

Since: API level 23

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method sets the application drawer button state. SHOW means that the icon appears in the favorites bar, HIDE means that the user needs to swipe up or down to view the list of applications on the favorite bar.

Parameters
state SHOW to show the application button, HIDE to hide it.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAppsButtonState(CustomDeviceManager.HIDE);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int setAudioVolume (int audioStream, int volumeLevel)

Since: API level 17

This method sets the volume level of the specified stream. If the volume is set greater than the maximum value for the stream, the volume will be set to the maximum permitted value.

Parameters
audioStream The audio stream to set the volume for: VOICE_CALL, SYSTEM_SOUNDS, RINGER, MEDIA_PLAYBACK, NOTIFICATIONS.
NOTE: CustomDeviceManager.ALARM no longer works on N OS.
volumeLevel The new volume level (stream dependent).
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAudioVolume(CustomDeviceManager.SYSTEM_SOUNDS, 10);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int setAutoCallPickupState (int state)

Since: API level 20

This method enables or disables auto call pickup.

Parameters
state ENABLE to enable, DISABLE to disable.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAutoCallPickupState(CustomDeviceManager.ON);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int setAutoRotationState (boolean state, int rotation)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off the auto-rotate feature of the device. If used for turning off the auto-rotate feature, the rotation parameter specifies the required rotation.

Parameters
state true to turn on auto rotation, false to turn it off .
rotation The rotation of the device: ROTATION_0, ROTATION_90, ROTATION_180, ROTATION_270 or ROTATION_CURRENT.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setAutoRotationState(false, CustomDeviceManager.ROTATION_90);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int setBatteryLevelColourItem (StatusbarIconItem batteryIconItem)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method sets the color of battery icon for each specified battery percentage level.
Setting a new list of battery percentage levels will clear the previous levels.
Default battery colors will be displayed if batteryIconItem is set to null.
NOTE: The new concept means that the battery color will revert to white when the device is charging or the battery percentage is in the final band. NOTE: A maximum of 5 battery percentage levels can be specified and the levels should be between 0% and 100% in increasing levels.
NOTE: The device may need to be rebooted for this change to take effect.

Parameters
batteryIconItem A Status Bar Icon Item StatusbarIconItem.
NOTE: The each attribute value represents battery percentage level below which the specified color applies.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     StatusbarIconItem.AttributeColour[] batteryColors = new StatusbarIconItem.AttributeColour[3];
     StatusbarIconItem batteryIconItem =
         new StatusbarIconItem(StatusbarIconItem.STATUSBAR_ICON_BATTERY_BARS, batteryColors);
     batteryIconItem.setAttributeColour(0,  10, 0xFFCC0000); // Red color when battery level is 10% or less
     batteryIconItem.setAttributeColour(1,  40, 0xFFCC6600); // Orange color when battery level is 40% or less
     batteryIconItem.setAttributeColour(2,  99, 0xFF8BCC15); // Green color when battery level is 99% or less
     batteryIconItem.setAttributeColour(3, 100, 0xFFFFFFFF); // White color when battery level is 100% or less (this is enforced by the firmware regardless of the specified color)
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if (kcsm.setBatteryLevelColourItem(batteryIconItem) == CustomDeviceManager.SUCCESS ) {
         Log.d(TAG, "The custom battery level colors have been set");
     }
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setBootingAnimation (ParcelFileDescriptor animationFD, ParcelFileDescriptor loopFD, ParcelFileDescriptor soundFD, int delay)

Since: API level 19

This method configures device boot animation.
All files must be present in the directory returned by getFilesDir() and file access permissions must be set for the files to be readable to others, using setReadable(true, false).
NOTE: If device encryption is turned ON from Settings > Security, then system default animation will be shown.
NOTE: This method might not work with certain operators. It is not currently supported by USA carrier devices and USA open model devices only support the feature after R2.8 of the Knox Customization SDK, which was merged into Knox SDK.
NOTE: The screen orientation is based on the location of the home button. Therefore it orients the screen frame in landscape mode if the home button is in horizontal position of the device, and vice versa.

Parameters
animationFD Specifies file containing graphics to be displayed.
loopFD Specifies file containing animation loop graphics to be displayed.
soundFD Specifies file containing sound to be played.
delay Specifies delay of boot sound in milliseconds.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     String animationFile = getFilesDir() + "/animation.qmg";
     String loopFile = getFilesDir() + "/animation_loopsource.qmg";
     String soundFile = getFilesDir() + "/sound.ogg";

     File fileAnimation = new File(animationFile);
     fileAnimation.setReadable(true, false);
     ParcelFileDescriptor animationFD = ParcelFileDescriptor.open(animationFile, ParcelFileDescriptor.MODE_READ_ONLY);
     File fileLoop = new File(loopFile);
     fileLoop.setReadable(true, false);
     ParcelFileDescriptor loopFD = ParcelFileDescriptor.open(loopFile, ParcelFileDescriptor.MODE_READ_ONLY);
     File fileSound = new File(soundFile);
     fileSound.setReadable(true, false);
     ParcelFileDescriptor soundFD = ParcelFileDescriptor.open(soundFile, ParcelFileDescriptor.MODE_READ_ONLY);

     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setBootingAnimation(animationFD, loopFD, soundFD, 2000);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setBrowserHomepage (String url)

Since: API level 17

This method sets the browser homepage.

Parameters
url The new homepage URL.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setBrowserHomepage("http://www.samsung.com");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setCallScreenDisabledItems (boolean status, int elements)

Since: API level 17

Deprecated in API level 37

This method turns on/off UI elements in the call screen on the device. The method only turns on/off those items that are included in the elements list, all other items are left untouched.

NOTE: Not all of the flags work on all devices.

Parameters
status true to turn off the specified UI elements, false to turn on them.
elements UI elements, as a combination of the following flags:
CALL_SCREEN_INCALL_EXTRA_VOLUME |
CALL_SCREEN_INCALL_ADD_CALL |
CALL_SCREEN_INCALL_SPEAKER |
CALL_SCREEN_INCALL_MUTE |
CALL_SCREEN_INCALL_BLUETOOTH |
CALL_SCREEN_ENDCALL_CONTACTS |
CALL_SCREEN_ENDCALL_CALL_BUTTONS |
CALL_SCREEN_ALL (= all of the above)
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     int callScreenElements = CustomDeviceManager.CALL_SCREEN_INCALL_SPEAKER | CustomDeviceManager.CALL_SCREEN_INCALL_BLUETOOTH;
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setCallScreenDisabledItems(true, callScreenElements);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setChargerConnectionSoundEnabledState (boolean state)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method turns on/off the charger connection sound. (i.e. whether a sound will play when the charger is connected).

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setChargerConnectionSoundEnabledState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setDeviceSpeakerEnabledState (boolean state)

Since: API level 17

This method turns on/off the device loud speaker.
Once turned on, all sound is played from device loud speaker, even though device is connected to headphone or any other external speaker.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The speaker state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setDeviceSpeakerEnabledState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setDisplayMirroringState (boolean state)

Since: API level 17

Deprecated in API level 37

This method sets the display mirroring state. Display mirroring allows the phone's display to be replicated onto another display device.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The display mirroring state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setDisplayMirroringState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setExtendedCallInfoState (boolean state)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method turns on/off extended call info.
When turned on, the device will broadcast intents of type com.samsung.android.knox.intent.action.CALL_STATE_CHANGED. Purpose of this is to extend the granularity of the existing available call state info from that publicly available in PhoneStateListener.
The particular transition which PhoneStateListener does not provide is between alerting and active (i.e. when an outgoing call has been answered). NOTE: Extended call info events are only broadcast if the device is in ProKiosk mode.

Parameters
state true to turn on extended call info, false to turn it off .
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setExtendedCallInfoState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.0
Multiuser Environment
Global Scope

public int setFavoriteApp (String packageName, int position)

Since: API level 23

This method sets the application at the specified position in the favorite bar. This is the bar at the bottom of the home screen that displays a list of shortcuts.

Parameters
packageName Package to be set as a favorite.
position The position of the application in the list as a number from 0 to getFavoriteAppsMaxCount() -1.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setFavoriteApp("com.samsung.android.contacts/com.android.dialer.DialtactsActivity", 0);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope

public int setForceAutoShutDownState (int mode)

Since: API level 22

This method turns on/off the Force Auto Shutdown feature. This feature determines if the device should switch off when a condition is met. The default value is NORMAL meaning the feature is switched off.

Parameters
mode NORMAL Switch auto shutdown off.
USB_DETACHED Shut down the device when the USB lead is detached.
IMMEDIATELY Shut down the device immediately.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setForceAutoShutdownState(CustomDeviceManager.USB_DETACHED);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 22
Version 2.8
Multiuser Environment
Global Scope

public int setForceAutoStartUpState (int state)

Since: API level 19

This method turns on/off the Force Auto Start Up feature. This feature modifies the boot loader start up behavior so that the device boots up fully when power is applied to USB connector instead of just booting up to the battery charging UI. The device can be powered down by removing power from USB connector and calling the powerOff() method.
NOTE: For Android OS 12 and lower, this feature is compatible with Qualcomm & LSI chipset only. For Android OS 13 and higher, it works on all devices (with any chipset).

Parameters
state ON turned on Auto Start Up.
OFF turned off Auto Start Up.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setForceAutoStartUpState(CustomDeviceManager.ON);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setGearNotificationState (boolean state)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method turns on/off the ongoing notification on Status Bar when device is connected to Gear accessory.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setGearNotificationState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setHardKeyIntentBroadcast (boolean state, int keyCode, int reportType, Intent intent, String setPackage, boolean deviceWide)

Since: API level 36

This method turns on/off hard key intent broadcasting.

Parameters
state true to broadcast intent for each keys you requests when it is pressed or released.
false to turn it off.
keyCode KeyEvent.KEYCODE_VOLUME_UP
KeyEvent.KEYCODE_VOLUME_DOWN
KeyEvent.KEYCODE_HOME
KeyEvent.KEYCODE_BACK
KeyEvent.KEYCODE_APP_SWITCH
KeyEvent.KEYCODE_POWER
KeyEvent.KEYCODE_HEADSETHOOK
KEYCODE_PTT
KEYCODE_EMERGENCY
reportType KEY_ACTION_DOWN_UP Key press and release.
KEY_ACTION_LONG Key long press.
KEY_ACTION_DOUBLE Key double press.
intent Intent you want to receive, and it could be null.
If it is null, the ACTION_HARD_KEY_REPORT intent will be broadcasted with the following extras:
- EXTRA_KEY_CODE that specifies the key that was pressed.
- EXTRA_REPORT_TYPE_NEW that specifies the type of key press.
- EXTRA_REPORT_TYPE_NEW_LONG_UP If it is an intent caused by release after long press, true or false
If it isn't null, you might want to use customizable intent which re-defined by 3rd app.
In the customizable intent, the above extras are still available.
setPackage Package name which the intent must be delivered to.
If you set, system will send explicit intent, otherwise it would be implicit intent.
deviceWide true to broadcast to DO and PO both.
false to broadcast to API caller's scope only, it is usually called as profileWide.
customizable intent CAN NOT be used in deviceWide, saying again it supports only profileWide.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setHardKeyIntentBroadcast(true, KeyEvent.KEYCODE_HOME, CustomDeviceManager.KEY_ACTION_DOWN_UP, null, null, false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 36
Version 3.9
Multiuser Environment
Global Scope

public int setHardKeyIntentState (int state, int keyCode, int reportType, int block)

Since: API level 29

Deprecated in API level 35

This method turns on/off hard key intent reporting, blocking or not hard key functionality.
If the state is ON, the ACTION_HARD_KEY_REPORT intent will be broadcasted with the following extras:

- EXTRA_KEY_CODE that specifies the key that was pressed.
- EXTRA_REPORT_TYPE that specifies the type of key press.

The client will be able to block or keep the hard key functionality configuring block parameter.

NOTE: The hard key functionality will be blocked if either KEY_ACTION_DOWN or KEY_ACTION_UP is passed at reportType parameter.

Parameters
state ON to turn hard key reporting on.
OFF to turn hard key reporting off.
keyCode KEYCODE_PTT PTT button key code.
KEYCODE_EMERGENCY Emergency button key code.
reportType KEY_ACTION_DOWN Key press.
KEY_ACTION_UP Key release.
block ON to block hard key functionality when state is ON.
OFF to keep hard key functionality when state is ON.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setHardKeyIntentState(CustomDeviceManager.ON, KPCCManager.KEYCODE_PTT, (CustomDeviceManager.KEY_ACTION_DOWN | CustomDeviceManager.KEY_ACTION_UP), CustomDeviceManager.ON);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 29
Version 3.4

public int setHardKeyIntentState (int state)

Since: API level 24

Deprecated in API level 35

This method turns on/off hard key intent reporting.
If this state is turned on, then the device will broadcast the intent -
ACTION_HARD_KEY_PRESS EXTRA_KEY_CODE, specifying the actual key pressed.
The keys that are responded to are -
KeyEvent.KEYCODE_VOLUME_UP
KeyEvent.KEYCODE_VOLUME_DOWN
KeyEvent.KEYCODE_HOME
KeyEvent.KEYCODE_BACK
KeyEvent.KEYCODE_MENU
KeyEvent.KEYCODE_APP_SWITCH
KeyEvent.KEYCODE_POWER

Parameters
state ON to turn hard key intent state on, OFF to turn it off.
Returns
  • SUCCESS The state was successfully set.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setHardKeyIntentState(CustomDeviceManager.OFF);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 24
Version 3.0
Multiuser Environment
Global Scope

public int setHomeScreenMode (int mode)

Since: API level 24

Deprecated in API level 37

This method sets the home screen mode to home screen only or home screen and applications.

Parameters
mode HOME_SCREEN_ONLY All application icons displayed on the home screen.
HOME_SCREEN_AND_APPS Applications displayed in the application drawer.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setHomeScreenMode(CustomDeviceManager.HOME_SCREEN_ONLY);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 24
Version 3.0
Multiuser Environment
Global Scope

public int setInfraredState (boolean state)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off the infrared (IR) transmitter.

Parameters
state true to turn on infrared, false to turn it off .
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     int result = kcsm.setInfraredState(false);
     Log.d(TAG, "Infrared set: " + result);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setKeyboardMode (int mode)

Since: API level 17

This method sets the Keyboard mode to Normal, Prediction Off or No Settings.

Parameters
mode KEYBOARD_MODE_NORMAL Default keyboard behavior.
KEYBOARD_MODE_PREDICTION_OFF Predictive text disabled.
KEYBOARD_MODE_SETTINGS_OFF Keyboard settings disabled.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setKeyboardMode(CustomDeviceManager.KEYBOARD_MODE_PREDICTION_OFF);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setLcdBacklightState (boolean state)

Since: API level 17

Deprecated in API level 37

This method turns LCD Backlight on and off.

Parameters
state true to turn LCD Backlight on, false to turn it off.
Returns
  • SUCCESS The LCD Backlight state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setLcdBacklightState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setLockScreenHiddenItems (boolean status, int elements)

Since: API level 17

This method hides or shows lock screen UI elements on the device. Only those items that are specified in the elements list will be affected, all the other UI elements will remain in their current state.

NOTE: Not all of the flags work on all devices.

Parameters
status true to hide the specified UI elements, false to show them.
elements UI elements, as a combination of the following flags:
LOCK_SCREEN_NONE
LOCK_SCREEN_CLOCK
LOCK_SCREEN_BATTERY_INFO
LOCK_SCREEN_CARRIER_INFO
LOCK_SCREEN_OWNER_INFO
LOCK_SCREEN_SHORTCUT
LOCK_SCREEN_HELP_TEXT
LOCK_SCREEN_NOTIFICATIONS
LOCK_SCREEN_ALL (= all UI items)
NOTE: LOCK_SCREEN_ALL also covers all the features that have been added from N OS that do not have individual settings. Setting LOCK_SCREEN_ALL will remove all the features from the lock screen and setting LOCK_SCREEN_NONE will restore all the features.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     int lockscreenElements = CustomDeviceManager.LOCK_SCREEN_CLOCK | CustomDeviceManager.LOCK_SCREEN_BATTERY_INFO);
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setLockScreenHiddenItems(true, lockscreenElements);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setLockScreenOverrideMode (int mode)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method overrides the lock screen. This feature allows the device to turn off the lock screen without removing the saved password or credentials. The default mode is LOCK_SCREEN_OVERRIDE_NORMAL.
NOTE: On device restart, lock screen will be set to normal.

Parameters
mode One of :
LOCK_SCREEN_OVERRIDE_NORMAL Normal operation,
LOCK_SCREEN_OVERRIDE_SWIPE Swipe or
LOCK_SCREEN_OVERRIDE_NONE None (no lock screen)
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setLockScreenOverrideMode(CustomDeviceManager.LOCK_SCREEN_OVERRIDE_SWIPE);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setLockScreenShortcut (int shortcut, String packageName)

Since: API level 20

This method sets the package name for a lock screen shortcut.

Parameters
shortcut BOTTOM_LEFT for left, BOTTOM_RIGHT for right
packageName the package name
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setLockScreenShortcut(CustomDeviceManager.BOTTOM_LEFT, "com.myco.mypackage");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int setMobileNetworkType (int type)

Since: API level 19

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method sets the mobile network type.

Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setMobileNetworkType(CustomDeviceManager.NETWORK_TYPE_WCDMA_PREF);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setMultiWindowState (boolean state)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off the multi-window feature on the device.

Parameters
state true to turn on the multi-window state, false to turn off the multi-window state.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setMultiWindowState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int setPowerDialogCustomItems (List<PowerItem> item)

Since: API level 19

This method sets the power dialog custom items, this will clear previously assigned items. The items are stored persistently.

Parameters
item List has to be less than 5 items, in case of empty or null the current custom items will be deleted.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
  CustomDeviceManager cdm = CustomDeviceManager.getInstance();
  SystemManager kcsm = cdm.getSystemManager();

  Intent intent = new Intent();
  intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  intent.setClassName("com.company.testapp",
      "com.company.testapp.testactivity");
  try {
      ArrayList list = new ArrayList();

      PowerItem object = new PowerItem(0,
                (BitmapDrawable) getResources().getDrawable(com.company.testapp.R.drawable.icon),
                intent,
                PowerItem.ACTION_START_ACTIVITY,
                "ACTION_START_ACTIVITY");
        list.add(object);
        object = new PowerItem(1,
                (BitmapDrawable) getResources().getDrawable(com.company.testapp.R.drawable.icon),
                intent,
                PowerItem.ACTION_SEND_BROADCAST,
                "ACTION_SEND_BROADCAST");
        list.add(object);
        object = new PowerItem(2,
                (BitmapDrawable) getResources().getDrawable(com.company.testapp.R.drawable.icon),
                intent,
                PowerItem.ACTION_SEND_STICKY_BROADCAST,
                "ACTION_SEND_STICKY_BROADCAST");
       list.add(object);

      CustomDeviceManager cdm = CustomDeviceManager.getInstance();
      SystemManager kcsm = cdm.getSystemManager();
      if( kcsm.setPowerDialogCustomItems(list) != CustomDeviceManager.SUCCESS ) {
          Log.d(TAG, "set custom items FAIL or INVALID_LENGTH");
      }
  } catch(SecurityException ex) {
      ex.printStackTrace();
  }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setPowerDialogCustomItemsState (boolean state)

Since: API level 19

This method turns on/off the power dialog custom items.

Parameters
state boolean true to turn on, false to turn off.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if (kcsm.setPowerDialogCustomItemsState(true) == CustomDeviceManager.SUCCESS) {
         Log.d(TAG, "Custom items  on");
     }
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setPowerMenuLockedState (boolean state)

Since: API level 17

Deprecated in API level 37

This method turns on/off the Power Menu when the device is locked.
NOTE: Since this API works by disabling power menu when power button was pressed while in the lockscreen, other APIs which disable the lockscreen will affect its function since there is no lockscreen to begin with. An example of such is when selecting the "None" option in setLockscreenOverrideMode API.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setPowerMenuLockedState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setQuickPanelButtons (int buttons)

Since: API level 19

This method sets the quick panel button visibility.

Returns
  • Bitmask containing the buttons that are to be shown.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setQuickPanelButtons(CustomDeviceManager.QUICK_PANEL_BUTTON_S_FINDER);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setQuickPanelEditMode (int mode)

Since: API level 19

This method turns on/off editing of the quick panel items.

Parameters
mode ON to turn on quick panel editing, OFF to turn it off .
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setQuickPanelEditMode(CustomDeviceManager.OFF);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setQuickPanelItems (List<Integer> items)

Since: API level 19

This method sets the list of items in the quick panel.

Parameters
items List of integer values to determine which items should be displayed.
Returns
  • SUCCESS The quick panel list was updated successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     List items = new ArrayList();
     items.add(CustomDeviceManager.QUICK_PANEL_WIFI);
     items.add(CustomDeviceManager.QUICK_PANEL_BLUETOOTH);
     items.add(CustomDeviceManager.QUICK_PANEL_LOCATION);
     items.add(CustomDeviceManager.QUICK_PANEL_WIFI_HOTSPOT);
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setQuickPanelItems(items);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setRecentLongPressActivity (String packageName)

Since: API level 17

Deprecated in API level 37

This method sets the package that should be started when the Recent hardware button is long-pressed.

Parameters
packageName The package to be started when the button is long-pressed. If this is null, the package name will be cleared.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if (kcsm.setRecentLongPressActivity("com.example.myPackage") == CustomDeviceManager.SUCCESS) {
         Log.d(TAG, "The package has been set to run.");
     }
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setRecentLongPressMode (int mode)

Since: API level 17

Deprecated in API level 37

This method sets the behavior for long-pressing the Recent hardware button. The valid options are RECENT_LONGPRESS_OFF, RECENT_LONGPRESS_HOME and RECENT_LONGPRESS_GLOBAL.
RECENT_LONGPRESS_OFF means that long-pressing the Recent button will have the default effect (displaying the menu).
RECENT_LONGPRESS_HOME means that long-pressing the Recent button when on the home application will start the specified application, otherwise it will have the default effect (displaying the menu).
RECENT_LONGPRESS_GLOBAL means that long-pressing the Recent button will start the specified application whatever application is currently running.

Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if (kcsm.setRecentLongPressMode(CustomDeviceManager.RECENT_LONGPRESS_GLOBAL) == CustomDeviceManager.SUCCESS) {
         Log.d(TAG, "The long-press will operate in all activities.");
     }
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setScreenOffOnHomeLongPressState (boolean state)

Since: API level 17

Deprecated in API level 37

This method turns on/off Screen Off on HOME long press.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setScreenOffOnHomeLongPressState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setScreenOffOnStatusBarDoubleTapState (boolean state)

Since: API level 17

Deprecated in API level 37

This method turns on/off Screen Off on status bar double tap.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setScreenOffOnStatusBarDoubleTapState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setScreenTimeout (int timeout)

Since: API level 17

Deprecated in API level 35

This method sets the screen timeout to the specified number of seconds. NOTE: The screen timeout can be set as any value from 5 to Integer.MAX_VALUE / 1000 seconds. Although,the UI updation in Settings is limited to 600 seconds only for Amoled Display and 1800 seconds only for Non-Amoled Display

Parameters
timeout The new screen timeout in seconds.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setScreenTimeout(60);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int setSensorDisabled (boolean status, int elements)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off hardware sensors on the device. The method only turn on/off those items that are included in the elements list; all other items are left untouched

Parameters
status true to turn off the specified sensors, false to turn on them.
elements Hardware sensors, as a combination of the following flags:
SENSOR_GYROSCOPE |
SENSOR_ACCELEROMETER |
SENSOR_LIGHT |
SENSOR_PROXIMITY |
SENSOR_MAGNETIC |
SENSOR_PRESSURE |
SENSOR_ALL (= all of the above)
NOTE: CustomDeviceManager.SENSOR_ORIENTATION no longer works on N OS.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     int sensorElements = CustomDeviceManager.SENSOR_ACCELEROMETER | CustomDeviceManager.SENSOR_GYROSCOPE);
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setSensorDisabled(true, sensorElements);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setShuttingDownAnimation (ParcelFileDescriptor animationFD, ParcelFileDescriptor soundFD)

Since: API level 19

This method configures device shutdown animation.
All files must be present in the directory returned by getFilesDir() and file access permissions must be set for the files to be readable to others, using setReadable(true, false).
NOTE: This method might not work with certain operators. It is not currently supported by USA carrier devices and USA open model devices only support the feature after R2.8 of the Knox Customization SDK, which was merged into the Knox SDK.

Parameters
animationFD Specifies file containing graphics to be displayed.
soundFD Specifies file containing sound to be played.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     String animationFile = getFilesDir() + "/animation.qmg";
     String soundFile = getFilesDir() + "/sound.ogg";

     File fileAnimation = new File(animationFile);
     fileAnimation.setReadable(true, false);
     ParcelFileDescriptor animationFD = ParcelFileDescriptor.open(animationFile, ParcelFileDescriptor.MODE_READ_ONLY);
     File fileSound = new File(soundFile);
     fileSound.setReadable(true, false);
     ParcelFileDescriptor soundFD = ParcelFileDescriptor.open(soundFile, ParcelFileDescriptor.MODE_READ_ONLY);

     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setShuttingDownAnimation(animationFD, soundFD);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setStatusBarClockState (boolean state)

Since: API level 19

This method shows or hides the display of the clock on the status bar.

Parameters
state true to show the clock, false to hide it.
Returns
  • SUCCESS The clock state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setStatusBarClockState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setStatusBarIconsState (boolean state)

Since: API level 19

This method shows or hides the display of the notification icons on the status bar.

Parameters
state true to show the notification icons, false to hide them.
Returns
  • SUCCESS The notification icons state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setStatusBarIconState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setStatusBarMode (int mode)

Since: API level 19

This method shows or hides the status bar. If the status bar is hidden in normal mode, every application will use the entire display space for itself. Notifications will therefore be hidden from the user. The status bar will still be available if you drag it down. Soft Navigation bar will be hidden from the user as well and available if you drag it up.

Parameters
mode The status bar mode: SHOW or HIDE.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setStatusBar(CustomDeviceManager.HIDE);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setStatusBarNotificationsState (boolean state)

Since: API level 19

This method shows or hides the display of Notifications and ability to expand the status bar.

Parameters
state true to show the notifications, false to hide them.
Returns
  • SUCCESS The notifications state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setStatusBarNotificationsState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setStatusBarText (String text, int style, int size)

Since: API level 17

This method sets status bar text, including text style and size.

Parameters
text Text string to be displayed on status bar.
style One of:
USE_DEFAULT
BOLD_TEXT_STYLE
ITALIC_TEXT_STYLE
BOLD_ITALIC_TEXT_STYLE
size Text size in dip or USE_DEFAULT for system default value.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setStatusBarText("Custom text", CustomDeviceManager.BOLD_TEXT_STYLE, 14);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setStatusBarTextScrollWidth (String text, int style, int size, int scrollwidth)

Since: API level 17

This method sets status bar text, including text style, size and scroll width.

Parameters
text Text string to be displayed on status bar.
style The Text Style:
USE_DEFAULT
BOLD_TEXT_STYLE
ITALIC_TEXT_STYLE
BOLD_ITALIC_TEXT_STYLE.
size Text size in dip or USE_DEFAULT for system default value.
scrollwidth Text scroll width in dip or USE_DEFAULT for system default value.
NOTE: If set to Default value, scrolling is turned off. When scrolling is turned on, the text is always displayed on a single line.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setStatusBarTextScrollWidth("Custom text", CustomDeviceManager.BOLD_TEXT_STYLE, 14, 120);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setSystemRingtone (int ringToneType, String ringToneName)

Since: API level 17

This method sets the specified ringtone or notification tone to the ringtone name specified. If the specified ringtone name does not exist, the ringtone is not changed.
NOTE: In order to specify a silent tone, the tone name should be set to an empty string (not null).

Parameters
ringToneType The ringtone type to be set: TYPE_RINGTONE, TYPE_RINGTONE_SECOND, TYPE_NOTIFICATION, TYPE_NOTIFICATION_SECOND.
ringToneName The name of the ringtone or notification sound.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     String ringToneName = "ringToneName";
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setSystemRingtone(CustomDeviceManager.RING_TONE_TYPE, ringToneName);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int setSystemSoundsEnabledState (int state, int elements)

Since: API level 19

Deprecated in API level 37

This method turns on/off specific system sounds on the device. The method only turns on/off those items that are included in the elements list; all other items are left untouched

Parameters
state ON to turn on the specified system sounds,
OFF to turn off them.
elements System sounds, as a combination of the following flags:
SYSTEM_SOUNDS_DTMF_DIALING |
SYSTEM_SOUNDS_SOUND_EFFECTS |
SYSTEM_SOUNDS_LOCKSCREEN |
SYSTEM_SOUNDS_HAPTIC_FEEDBACK |
SYSTEM_SOUNDS_SIP_KEY_FEEDBACK|
SYSTEM_SOUNDS_PEN_DETACH |
SYSTEM_SOUNDS_ALL (= all of the above)
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     int soundElements = CustomDeviceManager.SYSTEM_SOUNDS_DTMF_DIALING | CustomDeviceManager.SYSTEM_SOUNDS_SOUND_EFFECTS);
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setSystemSoundsEnabledState(CustomDeviceManager.ON, soundElements);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setSystemSoundsSilent ()

Since: API level 17

Deprecated in API level 35

This method turns off all system sounds.

Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setSystemSoundsSilent();
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.0
Multiuser Environment
Global Scope

public int setToastEnabledState (boolean state)

Since: API level 17

This method turns on/off the display of toasts.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setToastEnabledState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setToastGravity (int gravity, int x, int y)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method sets all values for custom toast gravity.
NOTE: These will always be overridden if an individual Toast calls Toast.setGravity().

Parameters
gravity The gravity, as a mask of android.view.Gravity constants.
x The X offset. May be negative.
y The Y offset. May be negative.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setToastGravity (Gravity.TOP | Gravity.LEFT, 40, 40);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setToastGravityEnabledState (boolean state)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off custom toast gravity. When turned on, toasts will appear by default according to the positioning set in SystemManager.#setToastGravity().

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setToastGravityEnabledState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setToastShowPackageNameState (boolean state)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off the display of package names on toasts.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setToastShowPackageNameState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setTorchOnVolumeButtonsState (boolean state)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off the operation of the torch on the Volume buttons. When turned on, and when the screen is off, a long press of Volume Up will turn the torch on. Any press of Volume Down will turn it off again.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setTorchOnVolumeButtonsState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setUnlockSimOnBootState (boolean state)

Since: API level 17

Deprecated in API level 37

This method sets the SIM card to unlock on boot.

Parameters
state true to turn on, false to turn off.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if (kcsm.setUnlockSimOnBootState(true) == CustomDeviceManager.SUCCESS)
        Log.d(TAG, "The SIM is set to be unlocked at boot time.");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setUnlockSimPin (String pin)

Since: API level 17

Deprecated in API level 37

This method sets the SIM card PIN.

Parameters
pin The SIM PIN code.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     if (kcsm.setUnlockSimPin("1234") == CustomDeviceManager.SUCCESS)
        Log.d(TAG, "The SIM PIN has been set.");
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setUsbConnectionType (int type)

Since: API level 20

This method sets the USB connection type.

Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setUsbConnectionType(CustomDeviceManager.USB_CONNECTION_TYPE_DEFAULT);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 20
Version 2.7
Multiuser Environment
Global Scope

public int setUsbMassStorageState (boolean state)

Since: API level 17

This method turns on/off USB mass storage (MTP) when the device is connected to a PC.

Parameters
state true to turn on mass storage, false to turn it off .
Returns
  • SUCCESS The mass storage state was changed.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setUsbMassStorageState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Multiuser Environment
Global Scope

public int setUsbNetAddresses (String sourceAddress, String destinationAddress)

Since: API level 17

Deprecated in API level 35

This method sets source and destination IP addresses for the USB Net functionality.

Parameters
sourceAddress The source IP address.
destinationAddress The destination IP address.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     String sourceAddress = "10.43.48.100";
     String destinationAddress = "10.43.48.101";
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setUsbNetAddresses(sourceAddress, destinationAddress);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setUsbNetState (boolean status)

Since: API level 17

Deprecated in API level 35

This method turns on/off the USB Net functionality. USB Net functionality offers Ethernet connectivity over USB using pre-configured fixed IP addresses.
NOTE: Switching on USB Net functionality automatically switches off the USB mass storage setting. Also, USB Net functionality cannot be turned on if USB Debugging mode is active.

Parameters
status true to turn on USB Net, false to turn it off .
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setUsbNetState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setUserInactivityTimeout (int timeout)

Since: API level 17

This method sets the timeout for user inactivity to the specified number of seconds. If the user is inactive for the specified length of time, an ACTION_NO_USER_ACTIVITY system intent is broadcast. The string value of this intent is "com.samsung.android.knox.intent.action.NO_USER_ACTIVITY". If the user subsequently interacts with the device, a ACTION_USER_ACTIVITY system intent is broadcast. The string value of this intent is "com.samsung.android.knox.intent.action.USER_ACTIVITY".
NOTE:

  • User activity is determined by physical user actions such as touching the screen or hardware keys. So, after initial boot, it won't be triggered unless user touches the screen. It is not triggered by events such as the lock screen for example.
  • System intents are not sent during screen off.

Parameters
timeout The user inactivity timeout in seconds.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setUserInactivityTimeout(60);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 1.0
Multiuser Environment
Global Scope

public int setVibrationIntensity (int mode, int value)

Since: API level 19

This method sets the vibration intensity.

Parameters
mode Vibration type to set: VIBRATION_CALL or VIBRATION_NOTIFICATION or VIBRATION_SYSTEM.
value Value range from 0 to VIBRATION_MAX_INTENSITY.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setVibrationIntensity(CustomDeviceManager.VIBRATION_CALL, 2);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setVolumeButtonRotationState (boolean state)

Since: API level 17

Deprecated in API level 27
NOTE: This API is not available since android 14.

This method turns on/off volume button rotation. When turned on, the hard volume buttons on the device will function according to the rotation of the screen (i.e. whichever button is at the top or on the right is Volume Up).

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setVolumeButtonRotationState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setVolumeControlStream (int streamType)

Since: API level 17

Deprecated in API level 30
NOTE: This API is not available since android 14.

This method sets the volume control stream.
If anything other than VOLUME_CONTROL_STREAM_DEFAULT is specified, then the selected stream will become the default master volume stream on the Volume Control panel, and will be the stream adjusted by the hard volume buttons.

Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setVolumeControlStream(CustomDeviceManager.VOLUME_CONTROL_STREAM_NOTIFICATION);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setVolumePanelEnabledState (boolean state)

Since: API level 17

This method turns on/off the volume panel display.

Parameters
state true to turn on, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setVolumePanelEnabledState(false);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setWifiAutoSwitchDelay (int delay)

Since: API level 17

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method sets the Wi-Fi delay in seconds after connection after which automatic switching can be carried out.

Parameters
delay The delay value in seconds.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setWifiAutoSwitchDelay(20);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setWifiAutoSwitchState (boolean state)

Since: API level 17

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method turns on/off the Wi-Fi auto switching. This feature allows the device to turn to another configured Wi-Fi network before it fully disconnects from the current network. It will only turn after a predetermined time connected to the current network; if the current signal strength drops below a preconfigured level and if there is another configured network within range.

Parameters
state true to turn on Wi-Fi automatic switching, false to turn off.
Returns
  • SUCCESS The state was set successfully.
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setWifiAutoSwitchState(true);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setWifiAutoSwitchThreshold (int threshold)

Since: API level 17

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method sets the Wi-Fi rssi value that will be used to determine whether to automatically turn to another configured network.

Parameters
threshold The threshold value in dBM.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setWifiAutoSwitchThreshold(-70);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 17
Version 2.5
Multiuser Environment
Global Scope

public int setWifiHotspotEnabledState (int state)

Since: API level 19

Deprecated in API level 33
NOTE: This API is not available since android 11.

This method turns on/off the device's mobile hotspot.

Parameters
state ON to turn on, OFF to turn off.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setWifiHotspotEnabledState(CustomDeviceManager.ON);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 19
Version 2.6
Multiuser Environment
Global Scope

public int setZeroPageState (int state)

Since: API level 23

This method sets the launcher's zero page state. The zero page is the Upday or Bixby page that is reached by swiping left from the launcher's first screen. SHOW means that the page is visible, HIDE means that the page is not visible. The default value is SHOW.

Parameters
state SHOW To show the launcher zero page.
HIDE To hide the launcher zero page.
Returns
Throws
SecurityException The calling application does not have the required permission.
Usage
 try {
     CustomDeviceManager cdm = CustomDeviceManager.getInstance();
     SystemManager kcsm = cdm.getSystemManager();
     kcsm.setZeroPageState(CustomDeviceManager.HIDE);
 } catch(SecurityException e) {
     Log.w(TAG, "SecurityException:" + e);
 }
 
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM" permission.
Since
API level 23
Version 2.9
Multiuser Environment
Global Scope