java.lang.Object | |
↳ | com.samsung.android.knox.ex.KnoxContract.Config.Device |
Deprecated in API level 37
This class provides to set device configuration
KEY_FORCE_AUTO_STARTUP
turns on/off the Force Auto Start Up feature KEY_SCREEN_TIMEOUT
sets the screen timeout to the specified number of seconds. KEY_AUTO_ROTATION_STATE
turns on/off the auto-rotate feature of the device. KEY_AUDIO_VOLUME
sets the volume level of the specified stream. Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | CONTENT_URI_STRING | ||||||||||
String | ID | ||||||||||
String | KEY_AUDIO_VOLUME |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
String | KEY_AUTO_ROTATION_STATE |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
String | KEY_FORCE_AUTO_STARTUP |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
String | KEY_SCREEN_TIMEOUT |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
String | PARAM_AUDIO_STREAM | ||||||||||
String | PARAM_AUDIO_STREAM_ALARM | ||||||||||
String | PARAM_AUDIO_STREAM_MEDIA_PLAYBACK | ||||||||||
String | PARAM_AUDIO_STREAM_NOTIFICATIONS | ||||||||||
String | PARAM_AUDIO_STREAM_RINGER | ||||||||||
String | PARAM_AUDIO_STREAM_SYSTEM_SOUNDS | ||||||||||
String | PARAM_AUDIO_STREAM_VOICE_CALL | ||||||||||
String | PARAM_AUDIO_VOLUME | ||||||||||
String | PARAM_AUTO_ROTATION_STATE | ||||||||||
String | PARAM_FORCE_AUTO_STARTUP | ||||||||||
String | PARAM_SCREEN_TIMEOUT |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Deprecated
in API level 37
NOTE: This API is not available since Android 16.
PARAM_AUDIO_STREAM
The audio stream to set the volume for: VOICE_CALL("0"), SYSTEM_SOUNDS("1"), RINGER("2"), MEDIA_PLAYBACK("3"), ALARM("4"), and NOTIFICATIONS("5").PARAM_AUDIO_VOLUME
The new volume level (stream dependent). 0 to 15 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); ContentValues contentValues = new ContentValues(); contentValues.put("audio-stream", "5"); contentValues.put("audio-volume", "1"); String selection = "key=?"; String[] selectionArgs = new String[] {"audio-volume"}; mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs); |
API level 34 |
Knox 3.7.1 |
The use of this feature requires the caller to have the "com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission. |
Deprecated
in API level 37
NOTE: This API is not available since Android 16.
KEY_AUTO_ROTATION_STATE
'true' for turns on auto-rotate, otherwise 'false' Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); ContentValues contentValues = new ContentValues(); contentValues.put("auto-rotation-state", "false"); String selection = "key=?"; String[] selectionArgs = new String[] {"auto-rotation-state"}; mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs); Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); String selection = "key=?"; String[] selectionArgs = new String[] {"auto-rotation-state"}; Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null); boolean autoRotationState = false; if (cursor != null) { cursor.moveToFirst(); autoRotationState = Boolean.parseBoolean(cursor.getString(0)); } |
API level 34 |
Knox 3.7.1 |
The use of this feature requires the caller to have the "com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission. |
Deprecated
in API level 37
NOTE: This API is not available since Android 16.
PARAM_FORCE_AUTO_STARTUP
the value used to 'force auto start-up'. e.g., '1' for using it,otherwise '0' Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); ContentValues contentValues = new ContentValues(); contentValues.put("force-auto-start-up-state", "1"); String selection = "key=?"; String[] selectionArgs = new String[] {"force-auto-start-up-state"}; mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs); Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); String selection = "key=?"; String[] selectionArgs = new String[] {"force-auto-start-up-state"}; Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null); int forceAutoStartUpState = -1; if (cursor != null) { cursor.moveToFirst(); forceAutoStartUpState = cursor.getInt(0); } |
API level 34 |
Knox 3.7.1 |
The use of this feature requires the caller to have the "com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission. |
Deprecated
in API level 37
NOTE: This API is not available since Android 16.
PARAM_SCREEN_TIMEOUT
The value to set screen timeout. e.g.,"60" for 1 minute Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); ContentValues contentValues = new ContentValues(); contentValues.put("screen-timeout", "30"); String selection = "key=?"; String[] selectionArgs = new String[] {"screen-timeout"}; mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs); Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/device"); String selection = "key=?"; String[] selectionArgs = new String[] {"screen-timeout"}; Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null); int screenTimeout = -1; if (cursor != null) { cursor.moveToFirst(); screenTimeout = cursor.getInt(0); } |
API level 34 |
Knox 3.7.1 |
The use of this feature requires the caller to have the "com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission. |