com.ardic.android.managers.systemconfig.ISystemConfigManager |
Provides a set of APIs for system related configurations. For example; system date, time, input type, keyboard setting and etc.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DISABLE_ALL | This flag for all status bar items. | |||||||||
int | DISABLE_BACK | This flag disables back button in status bar. | |||||||||
int | DISABLE_CLOCK | This flag disables clock in status bar. | |||||||||
int | DISABLE_EXPAND | This flag disables expand menu in status bar . | |||||||||
int | DISABLE_HOME | This flag disables home button in status bar. | |||||||||
int | DISABLE_NONE | This flag enables all status bar items. | |||||||||
int | DISABLE_NOTIFICATION_ALERTS | This flag disables notification alerts in status bar. | |||||||||
int | DISABLE_NOTIFICATION_ICONS | This flag disables notification icons in status bar. | |||||||||
int | DISABLE_NOTIFICATION_TICKER | This flag disables notification ticker in status bar. | |||||||||
int | DISABLE_RECENT | This flag disables recent task button in status bar. | |||||||||
int | DISABLE_SEARCH | This flag disables search bar. | |||||||||
int | DISABLE_SYSTEM_INFO | This flag disables system information in status bar. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears the default launcher.
| |||||||||||
Disable some features in the status bar.
| |||||||||||
Returns the date view format.
| |||||||||||
Returns default input method.
| |||||||||||
Returns the default launcher application package name.
| |||||||||||
Returns enabled input method list.
| |||||||||||
Returns the all selectable input method sub type list.
| |||||||||||
Returns default locale.
| |||||||||||
Returns the current location provider mode state.
| |||||||||||
Returns selected input method sub type.
| |||||||||||
Returns disabled Status Bar item(s).
| |||||||||||
Returns default TimeZoneId.
| |||||||||||
Returns true if time is in a daylight savings time period for this time zone.
| |||||||||||
Returns the time view format.
| |||||||||||
Return whether Airplane Mode is blocked or unblocked.
| |||||||||||
Returns whether Airplane Mode is currently ON/OFF.
| |||||||||||
Returns whether Air Plane Mode state change is blocked or not.
| |||||||||||
Returns the auto date and time feature state.
| |||||||||||
Returns auto restore blocking state.
| |||||||||||
Returns whether application auto sync is blocked or not.
| |||||||||||
Returns whether application auto sync is blocked or not while roaming.
| |||||||||||
Returns backup blocking state.
| |||||||||||
Returns the clipboard blocking state.
| |||||||||||
This method was deprecated
in API level 2.
Use
setClipboardBlocked(boolean) instead.
| |||||||||||
Returns crash report blocking state.
| |||||||||||
Returns date time change blocked state.
| |||||||||||
Returns factory reset blocking state.
| |||||||||||
Returns location provider's blocking state.
| |||||||||||
Returns the given location provider state.
| |||||||||||
Returns location state change blocking state.
| |||||||||||
Returns lock pattern visibility blocking state.
| |||||||||||
Returns lock pattern visibility state.
| |||||||||||
Returns multi-user blocked state.
| |||||||||||
Returns OTA (Over the air update) blocking state.
| |||||||||||
Returns password visibility state.
| |||||||||||
Returns recent apps dialog state.
| |||||||||||
For given user, returns recent apps dialog state.
| |||||||||||
Returns screenshot blocking state.
| |||||||||||
Sets the time view format as 24 and 12 hour.
| |||||||||||
Sets Airplane Mode state to blocked.
| |||||||||||
Sets Airplane Mode ON/OFF.
| |||||||||||
Disables the ability to change Airplane Mode state.
| |||||||||||
Sets the auto date and time feature state.
| |||||||||||
Sets auto restore blocking state.
| |||||||||||
Sets application auto sync blocking while roaming state.
| |||||||||||
Sets backup blocking state.
| |||||||||||
Sets the clipboard blocking state.
| |||||||||||
This method was deprecated
in API level 2.
Use
setClipboardBlocked(boolean) instead.
| |||||||||||
Sets crash report blocking state.
| |||||||||||
Sets the values for the calendar fields YEAR, MONTH and DAY_OF_MONTH.
| |||||||||||
Sets the date view format.
| |||||||||||
Sets date and time changing operation blocked.
| |||||||||||
Sets default input method.
| |||||||||||
Sets the default launcher by the given launcher application package name.
| |||||||||||
Sets enabled input method list.
| |||||||||||
Sets factory reset blocking state.
| |||||||||||
Sets default locale.
| |||||||||||
Sets location provider's blocking state.
| |||||||||||
Sets the given location provider state.
| |||||||||||
Sets location provider mode state.
| |||||||||||
Sets location state change blocking state.
| |||||||||||
Sets lock pattern visibility state blocked.
| |||||||||||
Sets lock pattern visibility state.
| |||||||||||
Sets multi-user feature blocked.
| |||||||||||
Sets OTA (Over the air update) blocking state.
| |||||||||||
Sets password visibility state.
| |||||||||||
Sets recent apps dialog state.
| |||||||||||
Sets screenshot blocking state.
| |||||||||||
Sets selected input method sub type.
| |||||||||||
Sets the values for the calendar fields HOUR_OF_DAY and MINUTE.
| |||||||||||
Sets default TimeZoneId.
| |||||||||||
Sets the default wallpaper.
|
This flag for all status bar items. When the flag is used, all top and buttom status bar items will be disabled.
This flag disables back button in status bar.
This flag disables clock in status bar.
This flag disables expand menu in status bar .
This flag disables home button in status bar.
This flag enables all status bar items.
This flag disables notification alerts in status bar.
This flag disables notification icons in status bar.
This flag disables notification ticker in status bar.
This flag disables recent task button in status bar.
This flag disables search bar.
This flag disables system information in status bar.
Clears the default launcher.
Returns | |
---|---|
boolean |
true if default launcher cleared successfully else false |
Throws | |
---|---|
AfexException |
Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. To
re-enable everything, pass DISABLE_NONE
. Each invocation of this API overrides
previous execution state.
// get instance ISystemConfigManager mSystemConfigManager = SystemConfigManager.getInterface(context); // disables all notification related items mSystemConfigManager.disableStatusBar(ISystemConfigManager.DISABLE_NOTIFICATION_ICONS | ISystemConfigManager.DISABLE_NOTIFICATION_ALERTS | ISystemConfigManager.DISABLE_NOTIFICATION_TICKER); // disables home, recent and back buttons. // In this case notifications items which set above will not be disabled. mSystemConfigManager.disableStatusBar(ISystemConfigManager.DISABLE_HOME | ISystemConfigManager.DISABLE_RECENT | ISystemConfigManager.DISABLE_BACK); // enables all status bar items. mSystemConfigManager.setStatusBarDisable(ISystemConfigManager.DISABLE_NONE); // disables all status bar items. mSystemConfigManager.setStatusBarDisable(ISystemConfigManager.DISABLE_ALL);
Parameters | |
---|---|
what |
int :
Pass the bitwise-or of the following flags.
Pass only
Pass only |
Throws | |
---|---|
AfexException |
Returns the date view format.
Returns | |
---|---|
String |
Date view format as follows; |
Throws | |
---|---|
AfexException |
Returns default input method.
Returns | |
---|---|
String |
Default input method id which be as following values; |
Throws | |
---|---|
AfexException |
Returns the default launcher application package name.
Returns | |
---|---|
String |
default launcher application package name if preferred launcher exist else null. |
Throws | |
---|---|
AfexException |
Returns enabled input method list.
Returns | |
---|---|
List<String> |
Enabled input method sub type list which can be as following values; |
Throws | |
---|---|
AfexException |
Returns the all selectable input method sub type list.
Returns | |
---|---|
List<String> |
All selectable input method sub type list which can be as following values; |
Throws | |
---|---|
AfexException |
Returns default locale.
Returns | |
---|---|
String |
Locale in string format by Locale.getDefault().toString() function call. |
Throws | |
---|---|
AfexException |
Returns the current location provider mode state.
Returns | |
---|---|
int |
mode Represent location provider's mode by LOCATION_MODE_OFF
LOCATION_MODE_SENSORS_ONLY
LOCATION_MODE_BATTERY_SAVING
LOCATION_MODE_HIGH_ACCURACY |
Throws | |
---|---|
AfexException |
Returns selected input method sub type.
Returns | |
---|---|
String |
Selected input method sub type which can be as following values; |
Throws | |
---|---|
AfexException |
Returns disabled Status Bar item(s).
Returns | |
---|---|
int |
the bitwise-or of the following flags. DISABLE_RECENT , DISABLE_HOME
, DISABLE_BACK , DISABLE_CLOCK , DISABLE_EXPAND ,
DISABLE_NOTIFICATION_ALERTS , DISABLE_NOTIFICATION_ICONS ,
DISABLE_NOTIFICATION_TICKER , DISABLE_SEARCH ,
DISABLE_SYSTEM_INFO
|
Throws | |
---|---|
AfexException |
Returns default TimeZoneId.
Returns | |
---|---|
String |
TimeZoneId in string format. For example, TimeZone.getTimeZone(timezoneID) returns TimeZone object. |
Throws | |
---|---|
AfexException |
See also:
Returns true if time is in a daylight savings time period for this time zone.
Parameters | |
---|---|
year |
int :
The value used to set the YEAR calendar field. |
month |
int :
The value used to set the MONTH calendar field. Month value is 0-based. for
example, 0 for January. |
day |
int :
The value used to set the DAY_OF_MONTH calendar field. |
Returns | |
---|---|
boolean |
true if time is in a daylight savings time period for this time zone else
false |
Throws | |
---|---|
AfexException |
Returns the time view format.
Returns | |
---|---|
boolean |
true if 24 hour time view format else false |
Throws | |
---|---|
AfexException |
Return whether Airplane Mode is blocked or unblocked.
Returns | |
---|---|
boolean |
true if Airplane Mode is blocked, false otherwise |
Throws | |
---|---|
AfexException |
See also:
Returns whether Air Plane Mode state change is blocked or not. If state change is blocked Wi-Fi connection remains its current state(No state changes occur).
Returns | |
---|---|
boolean |
true if Air Plane Mode state change is blocked, false otherwise. |
Throws | |
---|---|
AfexException |
Returns the auto date and time feature state.
Returns | |
---|---|
boolean |
true if auto date and time feature state else false |
Throws | |
---|---|
AfexException |
Returns auto restore blocking state.
Returns | |
---|---|
boolean |
true if auto restore blocked else false |
Throws | |
---|---|
AfexException |
Returns whether application auto sync is blocked or not. If auto sync while roaming is blocked applications can not sync their data.
Returns | |
---|---|
boolean |
true if auto sync is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether application auto sync is blocked or not while roaming. If auto sync while roaming is blocked applications can not sync their data.
Returns | |
---|---|
boolean |
true if auto sync while roaming is blocked else false . |
Throws | |
---|---|
AfexException |
Returns backup blocking state.
Returns | |
---|---|
boolean |
true if backup blocked else false |
Throws | |
---|---|
AfexException |
Returns the clipboard blocking state.
Returns | |
---|---|
boolean |
true if clipboard blocked else false |
Throws | |
---|---|
AfexException |
This method was deprecated
in API level 2.
Use setClipboardBlocked(boolean)
instead.
Returns the text edit(cut/copy/paste) blocking state.
Returns | |
---|---|
boolean |
true if text edit blocked else false |
Throws | |
---|---|
|
AfexException |
AfexException |
Returns crash report blocking state.
Returns | |
---|---|
boolean |
true if crash report blocked else false |
Throws | |
---|---|
AfexException |
Returns date time change blocked state.
Returns | |
---|---|
boolean |
true if date time change blocked else false |
Throws | |
---|---|
AfexException |
Returns factory reset blocking state.
Returns | |
---|---|
boolean |
true if factory reset blocked else false |
Throws | |
---|---|
AfexException |
Returns location provider's blocking state.
Returns | |
---|---|
boolean |
true if location provider blocked else false |
Throws | |
---|---|
AfexException |
Returns the given location provider state.
Parameters | |
---|---|
provider |
String :
Represent location providers by GPS_PROVIDER
NETWORK_PROVIDER PASSIVE_PROVIDER
FUSED_PROVIDER |
Returns | |
---|---|
boolean |
true if location provider enabled else false |
Throws | |
---|---|
AfexException |
Returns location state change blocking state.
Returns | |
---|---|
boolean |
true if location state change blocked else false |
Throws | |
---|---|
AfexException |
Returns lock pattern visibility blocking state.
Returns | |
---|---|
boolean |
true if lock pattern visibility blocked else false |
Throws | |
---|---|
AfexException |
Returns lock pattern visibility state.
Returns | |
---|---|
boolean |
true if lock pattern visible else false |
Throws | |
---|---|
AfexException |
Returns multi-user blocked state.
Returns | |
---|---|
boolean |
true if multi-user blocked blocked else false |
Throws | |
---|---|
AfexException |
Returns OTA (Over the air update) blocking state.
Returns | |
---|---|
boolean |
true if OTA blocked else false |
Throws | |
---|---|
AfexException |
Returns password visibility state.
Returns | |
---|---|
boolean |
true if password visible else false |
Throws | |
---|---|
AfexException |
Returns recent apps dialog state.
Returns | |
---|---|
boolean |
true if recent apps dialog blocked else false |
Throws | |
---|---|
AfexException |
For given user, returns recent apps dialog state.
Parameters | |
---|---|
userHandle |
UserHandle :
is UserHandle , representation of the user |
Returns | |
---|---|
boolean |
true if recent apps dialog blocked else false |
Throws | |
---|---|
AfexException |
Returns screenshot blocking state.
Returns | |
---|---|
boolean |
true if screenshot blocked else false |
Throws | |
---|---|
AfexException |
Sets the time view format as 24 and 12 hour.
Parameters | |
---|---|
is24HourFormat |
boolean :
true to set 24 hour time view format else false |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets Airplane Mode state to blocked.
In Blocking case; Airplane Mode is turned OFF ( setAirplaneModeEnabled(boolean)
) and it is
blocked.
The Airplane Mode can not be turned ON until it is unblocked.
In Unblocking case; Airplane Mode is unblocked and it is turned ON (
setAirplaneModeEnabled(boolean)
)
Parameters | |
---|---|
state |
boolean :
true to block Airplane Mode, false to unblock. |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false |
Throws | |
---|---|
AfexException |
See also:
Disables the ability to change Airplane Mode state.
In Blocking case; If Air Plane Mode state is ON it remains ON and can not be turned OFF by App UID. If Air Plane Mode is OFF it remains OFF and can not be turned ON by App UID.
The Air Plane Mode state can not be changed until it is unblocked.
In Unblocking case; Air Plane Mode can be disabled(Turned OFF) or enabled(Turn ON) by App UID.
Parameters | |
---|---|
state |
boolean :
true to block Air Plane Mode state change, false to unblock. |
Returns | |
---|---|
boolean |
true if the operation succeeds, else false |
Throws | |
---|---|
AfexException |
See also:
Sets the auto date and time feature state.
Parameters | |
---|---|
autoDateTime |
boolean :
true to enable auto date and time else false |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets auto restore blocking state.
Parameters | |
---|---|
state |
boolean :
true to block auto restore false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets application auto sync blocking while roaming state. If blocked applications can not sync data.
Parameters | |
---|---|
state |
boolean
|
Returns | |
---|---|
boolean |
true if the operation succeeds else false . |
Throws | |
---|---|
AfexException |
Sets backup blocking state.
Parameters | |
---|---|
state |
boolean :
true to block backup false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets the clipboard blocking state.
Parameters | |
---|---|
state |
boolean :
true to block clipboard false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
This method was deprecated
in API level 2.
Use setClipboardBlocked(boolean)
instead.
Sets the text edit(cut/copy/paste) blocking state.
Parameters | |
---|---|
state |
boolean :
true to block text edit false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
|
AfexException |
AfexException |
See also:
Sets crash report blocking state.
Parameters | |
---|---|
state |
boolean :
true to block crash report false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets the values for the calendar fields YEAR, MONTH and DAY_OF_MONTH.
Parameters | |
---|---|
year |
int :
The value used to set the YEAR calendar field. |
month |
int :
The value used to set the MONTH calendar field. Month value is 0-based. for
example, 0 for January. |
day |
int :
The value used to set the DAY_OF_MONTH calendar field. |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
See also:
Sets the date view format.
Parameters | |
---|---|
dateFormat |
String :
Date view format as follows; |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets date and time changing operation blocked.
Parameters | |
---|---|
state |
boolean :
true to block date time change false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets default input method.
Parameters | |
---|---|
inputMethodId |
String :
Default input method id which can be as following values; getInputMethodList() |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets the default launcher by the given launcher application package name.
Parameters | |
---|---|
packageName |
String :
Default launcher application package name. |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets enabled input method list.
Parameters | |
---|---|
inputMethodId |
String :
Default input method id which can be as following values; getInputMethodList() |
inputMethodSubTypeList |
List :
Enabled input method sub type list which can be as following
values; |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets factory reset blocking state.
Parameters | |
---|---|
state |
boolean :
true to block factory reset false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets default locale.
Parameters | |
---|---|
language |
String :
Lowercase two-letter ISO-639 code. See Locale class description. |
country |
String :
Uppercase two-letter ISO-3166 code. See Locale class description. |
variant |
String :
Vendor and browser specific code. See Locale class description. |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets location provider's blocking state.
Parameters | |
---|---|
state |
boolean :
true to block location providers false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets the given location provider state.
Parameters | |
---|---|
provider |
String :
Represent location providers by GPS_PROVIDER
NETWORK_PROVIDER PASSIVE_PROVIDER
FUSED_PROVIDER EmptyString for reset all enabled providers |
enabled |
boolean :
true to enable location provider false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets location provider mode state.
Warning: If enabling, a user consent dialog will pop up prompting the user to accept. If the user doesn't accept, network location won't be enabled.
Parameters | |
---|---|
mode |
int :
Represent location provider's mode by LOCATION_MODE_OFF
LOCATION_MODE_SENSORS_ONLY
LOCATION_MODE_BATTERY_SAVING
LOCATION_MODE_HIGH_ACCURACY |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets location state change blocking state.
Parameters | |
---|---|
state |
boolean :
true to block location state change false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets lock pattern visibility state blocked.
Parameters | |
---|---|
state |
boolean :
true to lock pattern visibility blocked false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets lock pattern visibility state.
Parameters | |
---|---|
state |
boolean :
true to visible lock pattern false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets multi-user feature blocked. It blocks multi-user management on the device until unblocked.
Parameters | |
---|---|
state |
boolean :
true to block multi-user false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets OTA (Over the air update) blocking state.
Parameters | |
---|---|
state |
boolean :
true to block OTA false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets password visibility state.
Parameters | |
---|---|
state |
boolean :
true to hide password character false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets recent apps dialog state.
Parameters | |
---|---|
state |
boolean :
true to block recent app dialog false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets screenshot blocking state.
Parameters | |
---|---|
state |
boolean :
true to block screenshot false otherwise |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets selected input method sub type. Example usage;
setSelectedInputMethodSubtype(getDefaultInputMethod(), "tr"); orsetSelectedInputMethodSubtype("com.android.inputmethod.latin/.LatinIME", "tr");
Parameters | |
---|---|
inputMethodId |
String :
Default input method id which can be as following values; getInputMethodList() |
inputMethodSubtype |
String :
Selected input method sub type which can be as following values;
|
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
Sets the values for the calendar fields HOUR_OF_DAY and MINUTE.
Parameters | |
---|---|
hourOfDay |
int :
The value used to set the HOUR_OF_DAY calendar field. |
minute |
int :
The value used to set the MINUTE calendar field. |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
See also:
Sets default TimeZoneId.
Parameters | |
---|---|
timezoneId |
String :
Time zone id. For example, TimeZone.getTimeZone("GMT-8").getID() returns
"GMT-08:00". |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |
See also:
Sets the default wallpaper. Warning; External storages is not supported so do not pass file path for file which resides on external storage.
Parameters | |
---|---|
filePath |
String :
Sample filePath:/sdcard/my_wallpaper.jpg |
Returns | |
---|---|
boolean |
true if the operation succeeds else false |
Throws | |
---|---|
AfexException |