| java.lang.Object | |
| ↳ | com.samsung.android.knox.ex.KnoxContract.Config.DateTime |
Deprecated in API level 37
This class provides to config device's date/time
KEY_DATETIME set Device's date&time, CAUTION: before using this api, KEY_AUTOMATIC_TIME should be turned off KEY_TIME_FORMAT set datetime format (12 or 24) KEY_AUTOMATIC_TIME set using automatic updated time | Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | CONTENT_URI_STRING | ||||||||||
| String | ID | ||||||||||
| String | KEY_AUTOMATIC_TIME |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
| String | KEY_DATETIME |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
| String | KEY_TIME_FORMAT |
Deprecated
in API level 37 NOTE: This API is not available since Android 16. |
|||||||||
| String | PARAM_AUTOMATIC_TIME | ||||||||||
| String | PARAM_DAY | ||||||||||
| String | PARAM_HOUR | ||||||||||
| String | PARAM_MINUTE | ||||||||||
| String | PARAM_MONTH | ||||||||||
| String | PARAM_SECOND | ||||||||||
| String | PARAM_TIME_FORMAT | ||||||||||
| String | PARAM_YEAR | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Deprecated
in API level 37
NOTE: This API is not available since Android 16.
PARAM_AUTOMATIC_TIME the value used to set the time format. e.g., 'true' for using automatic time,otherwise 'false'
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/date-time");
ContentValues contentValues = new ContentValues();
contentValues.put("automatic-time", "true");
String selection = "key=?";
String[] selectionArgs = new String[] {"automatic-time"};
mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs);
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/date-time");
String selection = "key=?";
String[] selectionArgs = new String[] {"automatic-time"};
Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
boolean automaticTime = false;
if (cursor != null) {
cursor.moveToFirst();
automaticTime = 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.
KEY_AUTOMATIC_TIME should be turned offPARAM_YEAR the value used to set the yearPARAM_MONTH the value used to set the month, month value is 0-based. e.g., 0 for January.PARAM_DAY the value used to set the day of month. e.g., 1 for 1st day of monthPARAM_HOUR the value used to set the hour of days. e.g., 13 for 01:00 PMPARAM_MINUTE the value used to set the minutePARAM_SECOND the value used to set the second
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/date-time");
ContentValues contentValues = new ContentValues();
contentValues.put("day", "21");
contentValues.put("month", "11");
contentValues.put("year", "2020");
contentValues.put("hour", "15");
contentValues.put("minute", "42");
contentValues.put("second", "26");
String selection = "key=?";
String[] selectionArgs = new String[] {"date-time"};
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.
PARAM_TIME_FORMAT the value used to set the timeformat. e.g., 12 for 01:00 PM, 24 for 13:00
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/date-time");
ContentValues contentValues = new ContentValues();
contentValues.put("time-format", "12");
String selection = "key=?";
String[] selectionArgs = new String[] {"time-format"};
mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs);
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/date-time");
String selection = "key=?";
String[] selectionArgs = new String[] {"time-format"};
Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
String timeFormat = ""
if (cursor != null) {
cursor.moveToFirst();
timeFormat = 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. |