Deprecated
in API level 37
Class Overview
This class provides to set device configuration
Specific Policy
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
String
CONTENT_URI_STRING
Since: API level 34
Constant Value:
"content://com.samsung.android.knox.sdk/config/device"
public
static
final
String
ID
Since: API level 34
public
static
final
String
KEY_AUDIO_VOLUME
Since: API level 34
Deprecated
in API level 37
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.
    Param
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
Usage
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);
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
|
Constant Value:
"audio-volume"
public
static
final
String
KEY_AUTO_ROTATION_STATE
Since: API level 34
Deprecated
in API level 37
This method turns on/off the auto-rotate feature of the device. If used forturning off the auto-rotate feature, the rotation parameter specifies the required rotation.
    Param
Usage
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));
}
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
|
Constant Value:
"auto-rotation-state"
public
static
final
String
KEY_FORCE_AUTO_STARTUP
Since: API level 34
Deprecated
in API level 37
This method turns on/off the Force Auto Start Up feature. This feature modifies theboot loader start up behavior so that the device boots up fully when power is applied toUSB connector instead of just booting up to the battery charging UI. The device can be powereddown by removing power from USB connector and calling the powerOff() method.
NOTE: This feature is compatible with Qualcomm & LSI chipset ONLY. It may not work consistently with chipsets other than ones listed.
    Param
Usage
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);
}
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
|
Constant Value:
"force-auto-start-up-state"
public
static
final
String
KEY_SCREEN_TIMEOUT
Since: API level 34
Deprecated
in API level 37
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
    Param
Usage
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);
}
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
|
Constant Value:
"screen-timeout"
public
static
final
String
PARAM_AUDIO_STREAM
Since: API level 34
Constant Value:
"audio-stream"
public
static
final
String
PARAM_AUDIO_STREAM_ALARM
Since: API level 34
public
static
final
String
PARAM_AUDIO_STREAM_MEDIA_PLAYBACK
Since: API level 34
public
static
final
String
PARAM_AUDIO_STREAM_NOTIFICATIONS
Since: API level 34
public
static
final
String
PARAM_AUDIO_STREAM_RINGER
Since: API level 34
public
static
final
String
PARAM_AUDIO_STREAM_SYSTEM_SOUNDS
Since: API level 34
public
static
final
String
PARAM_AUDIO_STREAM_VOICE_CALL
Since: API level 34
public
static
final
String
PARAM_AUDIO_VOLUME
Since: API level 34
Constant Value:
"audio-volume"
public
static
final
String
PARAM_AUTO_ROTATION_STATE
Since: API level 34
Constant Value:
"auto-rotation-state"
public
static
final
String
PARAM_FORCE_AUTO_STARTUP
Since: API level 34
Constant Value:
"force-auto-start-up-state"
public
static
final
String
PARAM_SCREEN_TIMEOUT
Since: API level 34
Constant Value:
"screen-timeout"
Public Constructors