Added in API level 1
public interface

ISystemConfigManager

com.ardic.android.managers.systemconfig.ISystemConfigManager

Class Overview

Provides a set of APIs for system related configurations. For example; system date, time, input type, keyboard setting and etc.

Summary

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
abstract boolean clearDefaultLauncher()
Clears the default launcher.
abstract void disableStatusBar(int what)
Disable some features in the status bar.
abstract String getDateFormat()
Returns the date view format.
abstract String getDefaultInputMethod()
Returns default input method.
abstract String getDefaultLauncher()
Returns the default launcher application package name.
abstract List<String> getEnabledInputMethodList()
Returns enabled input method list.
abstract List<String> getInputMethodSubtypeList()
Returns the all selectable input method sub type list.
abstract String getLocale()
Returns default locale.
abstract int getLocationProviderMode()
Returns the current location provider mode state.
abstract String getSelectedInputMethodSubtype()
Returns selected input method sub type.
abstract int getStatusBarDisabledItems()
Returns disabled Status Bar item(s).
abstract String getTimeZone()
Returns default TimeZoneId.
abstract boolean inDaylightTime(int year, int month, int day)
Returns true if time is in a daylight savings time period for this time zone.
abstract boolean is24HourFormat()
Returns the time view format.
abstract boolean isAirplaneModeBlocked()
Return whether Airplane Mode is blocked or unblocked.
abstract boolean isAirplaneModeEnabled()
Returns whether Airplane Mode is currently ON/OFF.
abstract boolean isAirplaneModeStateChangeBlocked()
Returns whether Air Plane Mode state change is blocked or not.
abstract boolean isAutoDateTimeEnabled()
Returns the auto date and time feature state.
abstract boolean isAutoRestoreBlocked()
Returns auto restore blocking state.
abstract boolean isAutoSyncBlocked()
Returns whether application auto sync is blocked or not.
abstract boolean isAutoSyncWhileRoamingBlocked()
Returns whether application auto sync is blocked or not while roaming.
abstract boolean isBackupBlocked()
Returns backup blocking state.
abstract boolean isClipboardBlocked()
Returns the clipboard blocking state.
abstract boolean isCopyPasteBlocked()
This method was deprecated in API level 2. Use setClipboardBlocked(boolean) instead.
abstract boolean isCrashReportBlocked()
Returns crash report blocking state.
abstract boolean isDateTimeChangeBlocked()
Returns date time change blocked state.
abstract boolean isFactoryResetBlocked()
Returns factory reset blocking state.
abstract boolean isLocationProviderBlocked()
Returns location provider's blocking state.
abstract boolean isLocationProviderEnabled(String provider)
Returns the given location provider state.
abstract boolean isLocationStateChangeBlocked()
Returns location state change blocking state.
abstract boolean isLockPatternVisibilityBlocked()
Returns lock pattern visibility blocking state.
abstract boolean isLockPatternVisible()
Returns lock pattern visibility state.
abstract boolean isMultiUserBlocked()
Returns multi-user blocked state.
abstract boolean isOtaBlocked()
Returns OTA (Over the air update) blocking state.
abstract boolean isPasswordVisible()
Returns password visibility state.
abstract boolean isRecentAppsDialogBlocked()
Returns recent apps dialog state.
abstract boolean isRecentAppsDialogBlockedForUser(UserHandle userHandle)
For given user, returns recent apps dialog state.
abstract boolean isScreenshotBlocked()
Returns screenshot blocking state.
abstract boolean set24HourFormat(boolean is24HourFormat)
Sets the time view format as 24 and 12 hour.
abstract boolean setAirplaneModeBlocked(boolean state)
Sets Airplane Mode state to blocked.
abstract boolean setAirplaneModeEnabled(boolean state)
Sets Airplane Mode ON/OFF.
abstract boolean setAirplaneModeStateChangeBlocked(boolean state)
Disables the ability to change Airplane Mode state.
abstract boolean setAutoDateTime(boolean autoDateTime)
Sets the auto date and time feature state.
abstract boolean setAutoRestoreBlocked(boolean state)
Sets auto restore blocking state.
abstract boolean setAutoSyncWhileRoamingBlocked(boolean state)
Sets application auto sync blocking while roaming state.
abstract boolean setBackupBlocked(boolean state)
Sets backup blocking state.
abstract boolean setClipboardBlocked(boolean state)
Sets the clipboard blocking state.
abstract boolean setCopyPasteBlocked(boolean state)
This method was deprecated in API level 2. Use setClipboardBlocked(boolean) instead.
abstract boolean setCrashReportBlocked(boolean state)
Sets crash report blocking state.
abstract boolean setDate(int year, int month, int day)
Sets the values for the calendar fields YEAR, MONTH and DAY_OF_MONTH.
abstract boolean setDateFormat(String dateFormat)
Sets the date view format.
abstract boolean setDateTimeChangeBlocked(boolean state)
Sets date and time changing operation blocked.
abstract boolean setDefaultInputMethod(String inputMethodId)
Sets default input method.
abstract boolean setDefaultLauncher(String packageName)
Sets the default launcher by the given launcher application package name.
abstract boolean setEnabledInputMethodList(String inputMethodId, List<String> inputMethodSubTypeList)
Sets enabled input method list.
abstract boolean setFactoryResetBlocked(boolean state)
Sets factory reset blocking state.
abstract boolean setLocale(String language, String country, String variant)
Sets default locale.
abstract boolean setLocationProviderBlocked(boolean state)
Sets location provider's blocking state.
abstract boolean setLocationProviderEnabled(String provider, boolean enabled)
Sets the given location provider state.
abstract boolean setLocationProviderMode(int mode)
Sets location provider mode state.
abstract boolean setLocationStateChangeBlocked(boolean state)
Sets location state change blocking state.
abstract boolean setLockPatternVisibilityBlocked(boolean state)
Sets lock pattern visibility state blocked.
abstract boolean setLockPatternVisible(boolean state)
Sets lock pattern visibility state.
abstract boolean setMultiUserBlocked(boolean state)
Sets multi-user feature blocked.
abstract boolean setOtaBlocked(boolean state)
Sets OTA (Over the air update) blocking state.
abstract boolean setPasswordVisible(boolean state)
Sets password visibility state.
abstract boolean setRecentAppsDialogBlocked(boolean state)
Sets recent apps dialog state.
abstract boolean setScreenshotBlocked(boolean state)
Sets screenshot blocking state.
abstract boolean setSelectedInputMethodSubtype(String inputMethodId, String inputMethodSubtype)
Sets selected input method sub type.
abstract boolean setTime(int hourOfDay, int minute)
Sets the values for the calendar fields HOUR_OF_DAY and MINUTE.
abstract boolean setTimeZone(String timezoneId)
Sets default TimeZoneId.
abstract boolean setWallpaper(String filePath)
Sets the default wallpaper.

Constants

public static final int DISABLE_ALL

Added in API level 1

This flag for all status bar items. When the flag is used, all top and buttom status bar items will be disabled.

Constant Value: -1 (0xffffffff)

public static final int DISABLE_BACK

Added in API level 1

This flag disables back button in status bar.

Constant Value: 4194304 (0x00400000)

public static final int DISABLE_CLOCK

Added in API level 1

This flag disables clock in status bar.

Constant Value: 8388608 (0x00800000)

public static final int DISABLE_EXPAND

Added in API level 1

This flag disables expand menu in status bar .

Constant Value: 65536 (0x00010000)

public static final int DISABLE_HOME

Added in API level 1

This flag disables home button in status bar.

Constant Value: 2097152 (0x00200000)

public static final int DISABLE_NONE

Added in API level 1

This flag enables all status bar items.

Constant Value: 0 (0x00000000)

public static final int DISABLE_NOTIFICATION_ALERTS

Added in API level 1

This flag disables notification alerts in status bar.

Constant Value: 262144 (0x00040000)

public static final int DISABLE_NOTIFICATION_ICONS

Added in API level 1

This flag disables notification icons in status bar.

Constant Value: 131072 (0x00020000)

public static final int DISABLE_NOTIFICATION_TICKER

Added in API level 1

This flag disables notification ticker in status bar.

Constant Value: 524288 (0x00080000)

public static final int DISABLE_RECENT

Added in API level 1

This flag disables recent task button in status bar.

Constant Value: 16777216 (0x01000000)

public static final int DISABLE_SEARCH

Added in API level 1

This flag disables search bar.

Constant Value: 33554432 (0x02000000)

public static final int DISABLE_SYSTEM_INFO

Added in API level 1

This flag disables system information in status bar.

Constant Value: 1048576 (0x00100000)

Public Methods

public abstract boolean clearDefaultLauncher ()

Added in API level 1

Clears the default launcher.

Returns
boolean true if default launcher cleared successfully else false
Throws
AfexException

public abstract void disableStatusBar (int what)

Added in API level 1

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. DISABLE_RECENT, DISABLE_HOME, DISABLE_BACK, DISABLE_CLOCK, DISABLE_EXPAND, DISABLE_NOTIFICATION_ALERTS, DISABLE_NOTIFICATION_ICONS, DISABLE_NOTIFICATION_TICKER, DISABLE_SEARCH, DISABLE_SYSTEM_INFO

Pass only DISABLE_ALL flag to disable all status bar items.

Pass only DISABLE_NONE flag to enable all status bar items.

Throws
AfexException

public abstract String getDateFormat ()

Added in API level 1

Returns the date view format.

Returns
String Date view format as follows;
  • null or empty string for default
  • MM-dd-yyyy
  • dd-MM-yyyy
  • yyyy-MM-dd
  • Throws
    AfexException

    public abstract String getDefaultInputMethod ()

    Added in API level 1

    Returns default input method.

    Returns
    String Default input method id which be as following values;
  • com.android.inputmethod.latin/.LatinIME
  • jp.co.omronsoft.openwnn/.OpenWnnJAJP
  • com.android.inputmethod.pinyin/.PinyinIME
  • Throws
    AfexException

    public abstract String getDefaultLauncher ()

    Added in API level 1

    Returns the default launcher application package name.

    Returns
    String default launcher application package name if preferred launcher exist else null.
    Throws
    AfexException

    public abstract List<String> getEnabledInputMethodList ()

    Added in API level 1

    Returns enabled input method list.

    Returns
    List<String> Enabled input method sub type list which can be as following values;
  • en_US: English United States/qwerty
  • en_GB: English Great Britain/qwerty
  • tr: Turkish/qwerty
  • Whole list in the packages/inputmethods/LatinIME/java/res/xml/method.xml file.
  • Throws
    AfexException

    public abstract List<String> getInputMethodSubtypeList ()

    Added in API level 1

    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;
  • en_US: English United States/qwerty
  • en_GB: English Great Britain/qwerty
  • tr: Turkish/qwerty
  • Whole list in the packages/inputmethods/LatinIME/java/res/xml/method.xml file.
  • Throws
    AfexException

    public abstract String getLocale ()

    Added in API level 1

    Returns default locale.

    Returns
    String Locale in string format by Locale.getDefault().toString() function call.
    Throws
    AfexException

    public abstract int getLocationProviderMode ()

    Added in API level 2

    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

    public abstract String getSelectedInputMethodSubtype ()

    Added in API level 1

    Returns selected input method sub type.

    Returns
    String Selected input method sub type which can be as following values;
  • en_US: English United States/qwerty
  • en_GB: English Great Britain/qwerty
  • tr: Turkish/qwerty
  • Whole list in the packages/inputmethods/LatinIME/java/res/xml/method.xml file.
  • Throws
    AfexException

    public abstract int getStatusBarDisabledItems ()

    Added in API level 1

    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

    DISABLE_ALL indicates all status bar items are disabled.

    DISABLE_NONE indicates all status bar items are enabled.

    Throws
    AfexException

    public abstract String getTimeZone ()

    Added in API level 1

    Returns default TimeZoneId.

    Returns
    String TimeZoneId in string format. For example, TimeZone.getTimeZone(timezoneID) returns TimeZone object.
    Throws
    AfexException

    See also:

    public abstract boolean inDaylightTime (int year, int month, int day)

    Added in API level 1

    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

    public abstract boolean is24HourFormat ()

    Added in API level 1

    Returns the time view format.

    Returns
    boolean true if 24 hour time view format else false
    Throws
    AfexException

    public abstract boolean isAirplaneModeBlocked ()

    Added in API level 5

    Return whether Airplane Mode is blocked or unblocked.

    Returns
    boolean true if Airplane Mode is blocked, false otherwise
    Throws
    AfexException

    public abstract boolean isAirplaneModeEnabled ()

    Added in API level 5

    Returns whether Airplane Mode is currently ON/OFF.

    Returns
    boolean
    Throws
    AfexException

    public abstract boolean isAirplaneModeStateChangeBlocked ()

    Added in API level 5

    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

    public abstract boolean isAutoDateTimeEnabled ()

    Added in API level 1

    Returns the auto date and time feature state.

    Returns
    boolean true if auto date and time feature state else false
    Throws
    AfexException

    public abstract boolean isAutoRestoreBlocked ()

    Added in API level 1

    Returns auto restore blocking state.

    Returns
    boolean true if auto restore blocked else false
    Throws
    AfexException

    public abstract boolean isAutoSyncBlocked ()

    Added in API level 1

    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

    public abstract boolean isAutoSyncWhileRoamingBlocked ()

    Added in API level 1

    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

    public abstract boolean isBackupBlocked ()

    Added in API level 1

    Returns backup blocking state.

    Returns
    boolean true if backup blocked else false
    Throws
    AfexException

    public abstract boolean isClipboardBlocked ()

    Added in API level 2

    Returns the clipboard blocking state.

    Returns
    boolean true if clipboard blocked else false
    Throws
    AfexException

    public abstract boolean isCopyPasteBlocked ()

    Added in API level 1

    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

    public abstract boolean isCrashReportBlocked ()

    Added in API level 1

    Returns crash report blocking state.

    Returns
    boolean true if crash report blocked else false
    Throws
    AfexException

    public abstract boolean isDateTimeChangeBlocked ()

    Added in API level 1

    Returns date time change blocked state.

    Returns
    boolean true if date time change blocked else false
    Throws
    AfexException

    public abstract boolean isFactoryResetBlocked ()

    Added in API level 1

    Returns factory reset blocking state.

    Returns
    boolean true if factory reset blocked else false
    Throws
    AfexException

    public abstract boolean isLocationProviderBlocked ()

    Added in API level 1

    Returns location provider's blocking state.

    Returns
    boolean true if location provider blocked else false
    Throws
    AfexException

    public abstract boolean isLocationProviderEnabled (String provider)

    Added in API level 1

    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

    public abstract boolean isLocationStateChangeBlocked ()

    Added in API level 5

    Returns location state change blocking state.

    Returns
    boolean true if location state change blocked else false
    Throws
    AfexException

    public abstract boolean isLockPatternVisibilityBlocked ()

    Added in API level 2

    Returns lock pattern visibility blocking state.

    Returns
    boolean true if lock pattern visibility blocked else false
    Throws
    AfexException

    public abstract boolean isLockPatternVisible ()

    Added in API level 2

    Returns lock pattern visibility state.

    Returns
    boolean true if lock pattern visible else false
    Throws
    AfexException

    public abstract boolean isMultiUserBlocked ()

    Added in API level 1

    Returns multi-user blocked state.

    Returns
    boolean true if multi-user blocked blocked else false
    Throws
    AfexException

    public abstract boolean isOtaBlocked ()

    Added in API level 2

    Returns OTA (Over the air update) blocking state.

    Returns
    boolean true if OTA blocked else false
    Throws
    AfexException

    public abstract boolean isPasswordVisible ()

    Added in API level 1

    Returns password visibility state.

    Returns
    boolean true if password visible else false
    Throws
    AfexException

    public abstract boolean isRecentAppsDialogBlocked ()

    Added in API level 1

    Returns recent apps dialog state.

    Returns
    boolean true if recent apps dialog blocked else false
    Throws
    AfexException

    public abstract boolean isRecentAppsDialogBlockedForUser (UserHandle userHandle)

    Added in API level 5

    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

    public abstract boolean isScreenshotBlocked ()

    Added in API level 1

    Returns screenshot blocking state.

    Returns
    boolean true if screenshot blocked else false
    Throws
    AfexException

    public abstract boolean set24HourFormat (boolean is24HourFormat)

    Added in API level 1

    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

    public abstract boolean setAirplaneModeBlocked (boolean state)

    Added in API level 5

    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

    public abstract boolean setAirplaneModeEnabled (boolean state)

    Added in API level 5

    Sets Airplane Mode ON/OFF.

    Returns
    boolean
    Throws
    AfexException

    public abstract boolean setAirplaneModeStateChangeBlocked (boolean state)

    Added in API level 5

    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

    public abstract boolean setAutoDateTime (boolean autoDateTime)

    Added in API level 1

    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

    public abstract boolean setAutoRestoreBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setAutoSyncWhileRoamingBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setBackupBlocked (boolean state)

    Added in API level 1

    Sets backup blocking state.

    Parameters
    state boolean: true to block backup false otherwise
    Returns
    boolean true if the operation succeeds else false
    Throws
    AfexException

    public abstract boolean setClipboardBlocked (boolean state)

    Added in API level 2

    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

    public abstract boolean setCopyPasteBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setCrashReportBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setDate (int year, int month, int day)

    Added in API level 1

    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:

    public abstract boolean setDateFormat (String dateFormat)

    Added in API level 1

    Sets the date view format.

    Parameters
    dateFormat String: Date view format as follows;
  • null or empty string for default
  • MM-dd-yyyy
  • dd-MM-yyyy
  • yyyy-MM-dd
  • Returns
    boolean true if the operation succeeds else false
    Throws
    AfexException

    public abstract boolean setDateTimeChangeBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setDefaultInputMethod (String inputMethodId)

    Added in API level 1

    Sets default input method.

    Parameters
    inputMethodId String: Default input method id which can be as following values;
  • com.android.inputmethod.latin/.LatinIME
  • jp.co.omronsoft.openwnn/.OpenWnnJAJP
  • com.android.inputmethod.pinyin/.PinyinIME
  • inputMethodList can be grabbed by getInputMethodList()
    Returns
    boolean true if the operation succeeds else false
    Throws
    AfexException

    public abstract boolean setDefaultLauncher (String packageName)

    Added in API level 1

    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

    public abstract boolean setEnabledInputMethodList (String inputMethodId, List<String> inputMethodSubTypeList)

    Added in API level 1

    Sets enabled input method list.

    Parameters
    inputMethodId String: Default input method id which can be as following values;
  • com.android.inputmethod.latin/.LatinIME
  • jp.co.omronsoft.openwnn/.OpenWnnJAJP
  • com.android.inputmethod.pinyin/.PinyinIME
  • inputMethodList can be grabbed by getInputMethodList()
    inputMethodSubTypeList List: Enabled input method sub type list which can be as following values;
  • en_US: English United States/qwerty
  • en_GB: English Great Britain/qwerty
  • tr: Turkish/qwerty
  • Whole list in the packages/inputmethods/LatinIME/java/res/xml/method.xml file.
  • Returns
    boolean true if the operation succeeds else false
    Throws
    AfexException

    public abstract boolean setFactoryResetBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setLocale (String language, String country, String variant)

    Added in API level 1

    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

    public abstract boolean setLocationProviderBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setLocationProviderEnabled (String provider, boolean enabled)

    Added in API level 1

    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

    public abstract boolean setLocationProviderMode (int mode)

    Added in API level 2

    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

    public abstract boolean setLocationStateChangeBlocked (boolean state)

    Added in API level 5

    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

    public abstract boolean setLockPatternVisibilityBlocked (boolean state)

    Added in API level 2

    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

    public abstract boolean setLockPatternVisible (boolean state)

    Added in API level 2

    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

    public abstract boolean setMultiUserBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setOtaBlocked (boolean state)

    Added in API level 2

    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

    public abstract boolean setPasswordVisible (boolean state)

    Added in API level 1

    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

    public abstract boolean setRecentAppsDialogBlocked (boolean state)

    Added in API level 1

    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

    public abstract boolean setScreenshotBlocked (boolean state)

    Added in API level 1

    Sets screenshot blocking state.

    Parameters
    state boolean: true to block screenshot false otherwise
    Returns
    boolean true if the operation succeeds else false
    Throws
    AfexException

    public abstract boolean setSelectedInputMethodSubtype (String inputMethodId, String inputMethodSubtype)

    Added in API level 1

    Sets selected input method sub type. Example usage;

     setSelectedInputMethodSubtype(getDefaultInputMethod(), "tr"); or
     
    setSelectedInputMethodSubtype("com.android.inputmethod.latin/.LatinIME", "tr");

    Parameters
    inputMethodId String: Default input method id which can be as following values;
  • com.android.inputmethod.latin/.LatinIME
  • jp.co.omronsoft.openwnn/.OpenWnnJAJP
  • com.android.inputmethod.pinyin/.PinyinIME
  • inputMethodList can be grabbed by getInputMethodList()
    inputMethodSubtype String: Selected input method sub type which can be as following values;
  • en_US: English United States/qwerty
  • en_GB: English Great Britain/qwerty
  • tr: Turkish/qwerty
  • Whole list in the packages/inputmethods/LatinIME/java/res/xml/method.xml file.
  • Returns
    boolean true if the operation succeeds else false
    Throws
    AfexException

    public abstract boolean setTime (int hourOfDay, int minute)

    Added in API level 1

    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:

    public abstract boolean setTimeZone (String timezoneId)

    Added in API level 1

    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:

    public abstract boolean setWallpaper (String filePath)

    Added in API level 1

    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