java.lang.Object | ||
↳ | android.provider.Settings.NameValueTable | |
↳ | android.provider.Settings.Global |
Global system settings, containing preferences that always apply identically to all defined users. Applications can read these but are not allowed to write; like the "Secure" settings, these are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ADB_ENABLED | Whether ADB is enabled. | |||||||||
String | AIRPLANE_MODE_ON | Whether Airplane Mode is on. | |||||||||
String | AIRPLANE_MODE_RADIOS | A comma separated list of radios that need to be disabled when airplane mode is on. | |||||||||
String | ALWAYS_FINISH_ACTIVITIES | If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed. | |||||||||
String | ANIMATOR_DURATION_SCALE | Scaling factor for Animator-based animations. | |||||||||
String | AUTO_TIME | Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ). | |||||||||
String | AUTO_TIME_ZONE | Value to specify if the user prefers the time zone to be automatically fetched from the network (NITZ). | |||||||||
String | BLUETOOTH_ON | Whether bluetooth is enabled/disabled 0=disabled. | |||||||||
String | DATA_ROAMING | Whether or not data roaming is enabled. | |||||||||
String | DEBUG_APP | Name of an application package to be debugged. | |||||||||
String | DEVELOPMENT_SETTINGS_ENABLED | Whether user has enabled development settings. | |||||||||
String | DEVICE_PROVISIONED | Whether the device has been provisioned (0 = false, 1 = true) | |||||||||
String | HTTP_PROXY | Host name and port for global http proxy. | |||||||||
String | INSTALL_NON_MARKET_APPS | Whether the package installer should allow installation of apps downloaded from sources other than Google Play. | |||||||||
String | MODE_RINGER | Ringer mode. | |||||||||
String | NETWORK_PREFERENCE | User preference for which network(s) should be used. | |||||||||
String | RADIO_BLUETOOTH | Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio. | |||||||||
String | RADIO_CELL | Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. | |||||||||
String | RADIO_NFC | Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio. | |||||||||
String | RADIO_WIFI | Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. | |||||||||
String | SHOW_PROCESSES | Control whether the process CPU usage meter should be shown. | |||||||||
String | STAY_ON_WHILE_PLUGGED_IN | Whether we keep the device on while the device is plugged in. | |||||||||
String | SYS_PROP_SETTING_VERSION | ||||||||||
String | TRANSITION_ANIMATION_SCALE | Scaling factor for activity transition animations. | |||||||||
String | USB_MASS_STORAGE_ENABLED | USB Mass Storage Enabled | |||||||||
String | USE_GOOGLE_MAIL | If this setting is set (to anything), then all references to Gmail on the device must change to Google Mail. | |||||||||
String | WAIT_FOR_DEBUGGER | If 1, when launching DEBUG_APP it will wait for the debugger before starting user code. | |||||||||
String | WIFI_MAX_DHCP_RETRY_COUNT | The maximum number of times we will retry a connection to an access point for which we have failed in acquiring an IP address from DHCP. | |||||||||
String | WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS | Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile data connectivity to be established after a disconnect from Wi-Fi. | |||||||||
String | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON | Whether to notify the user of open networks. | |||||||||
String | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY | Delay (in seconds) before repeating the Wi-Fi networks available notification. | |||||||||
String | WIFI_NUM_OPEN_NETWORKS_KEPT | When the number of open networks exceeds this number, the least-recently-used excess networks will be removed. | |||||||||
String | WIFI_ON | Whether the Wi-Fi should be on. | |||||||||
String | WIFI_SLEEP_POLICY | The policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection). | |||||||||
int | WIFI_SLEEP_POLICY_DEFAULT | Value for WIFI_SLEEP_POLICY to use the default Wi-Fi sleep
policy, which is to sleep shortly after the turning off
according to the STAY_ON_WHILE_PLUGGED_IN setting. |
|||||||||
int | WIFI_SLEEP_POLICY_NEVER | Value for WIFI_SLEEP_POLICY to never go to sleep. |
|||||||||
int | WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED | Value for WIFI_SLEEP_POLICY to use the default policy when
the device is on battery, and never go to sleep when the device is
plugged in. |
|||||||||
String | WIFI_WATCHDOG_ON | Whether the Wi-Fi watchdog is enabled. | |||||||||
String | WINDOW_ANIMATION_SCALE | Scaling factor for normal window animations. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.provider.Settings.NameValueTable
| |||||||||||
From interface
android.provider.BaseColumns
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONTENT_URI | The content:// style URL for global secure settings items. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Convenience function for retrieving a single secure settings value
as a floating point number.
| |||||||||||
Convenience function for retrieving a single secure settings value
as a float.
| |||||||||||
Convenience function for retrieving a single secure settings value
as an integer.
| |||||||||||
Convenience function for retrieving a single secure settings value
as an integer.
| |||||||||||
Convenience function for retrieving a single secure settings value
as a
long . | |||||||||||
Convenience function for retrieving a single secure settings value
as a
long . | |||||||||||
Look up a name in the database.
| |||||||||||
Construct the content URI for a particular name/value pair,
useful for monitoring changes with a ContentObserver.
| |||||||||||
Convenience function for updating a single settings value as a
floating point number.
| |||||||||||
Convenience function for updating a single settings value as an
integer.
| |||||||||||
Convenience function for updating a secure settings value as a long
integer.
| |||||||||||
Store a name/value pair into the database.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.provider.Settings.NameValueTable
| |||||||||||
From class
java.lang.Object
|
Whether ADB is enabled.
Whether Airplane Mode is on.
A comma separated list of radios that need to be disabled when airplane mode is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are included in the comma separated list.
If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed. If 0, the normal extended lifetime is used.
Scaling factor for Animator-based animations. This affects both the start delay and duration of all such animations. Setting to 0 will cause animations to end immediately. The default value is 1.
Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ). 1=yes, 0=no
Value to specify if the user prefers the time zone to be automatically fetched from the network (NITZ). 1=yes, 0=no
Whether bluetooth is enabled/disabled 0=disabled. 1=enabled.
Whether or not data roaming is enabled. (0 = false, 1 = true)
Name of an application package to be debugged.
Whether user has enabled development settings.
Whether the device has been provisioned (0 = false, 1 = true)
Host name and port for global http proxy. Uses ':' seperator for between host and port.
Whether the package installer should allow installation of apps downloaded from sources other than Google Play. 1 = allow installing from other sources 0 = only allow installing from Google Play
Ringer mode. This is used internally, changing this value will not change the ringer mode. See AudioManager.
User preference for which network(s) should be used. Only the connectivity service should touch this.
Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio.
Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
Control whether the process CPU usage meter should be shown.
Whether we keep the device on while the device is plugged in. Supported values are:
0
to never stay on while plugged inBATTERY_PLUGGED_AC
to stay on for AC chargerBATTERY_PLUGGED_USB
to stay on for USB chargerBATTERY_PLUGGED_WIRELESS
to stay on for wireless chargerScaling factor for activity transition animations. Setting to 0 will disable window animations.
USB Mass Storage Enabled
If this setting is set (to anything), then all references to Gmail on the device must change to Google Mail.
If 1, when launching DEBUG_APP it will wait for the debugger before starting user code. If 0, it will run normally.
The maximum number of times we will retry a connection to an access point for which we have failed in acquiring an IP address from DHCP. A value of N means that we will make N+1 connection attempts in all.
Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile data connectivity to be established after a disconnect from Wi-Fi.
Whether to notify the user of open networks.
If not connected and the scan results have an open network, we will
put this notification up. If we attempt to connect to a network or
the open network(s) disappear, we remove the notification. When we
show the notification, we will not show it again for
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY
time.
Delay (in seconds) before repeating the Wi-Fi networks available notification. Connecting to a network will reset the timer.
When the number of open networks exceeds this number, the least-recently-used excess networks will be removed.
Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
The policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).
Set to one of WIFI_SLEEP_POLICY_DEFAULT
,
WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED
, or
WIFI_SLEEP_POLICY_NEVER
.
Value for WIFI_SLEEP_POLICY
to use the default Wi-Fi sleep
policy, which is to sleep shortly after the turning off
according to the STAY_ON_WHILE_PLUGGED_IN
setting.
Value for WIFI_SLEEP_POLICY
to never go to sleep.
Value for WIFI_SLEEP_POLICY
to use the default policy when
the device is on battery, and never go to sleep when the device is
plugged in.
Whether the Wi-Fi watchdog is enabled.
Scaling factor for normal window animations. Setting to 0 will disable window animations.
The content:// style URL for global secure settings items. Not public.
Convenience function for retrieving a single secure settings value as a floating point number. Note that internally setting values are always stored as strings; this function converts the string to an float for you. The default value will be returned if the setting is not defined or not a valid float.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
def | Value to return if the setting is not defined. |
Convenience function for retrieving a single secure settings value as a float. Note that internally setting values are always stored as strings; this function converts the string to a float for you.
This version does not take a default value. If the setting has not
been set, or the string value is not a number,
it throws Settings.SettingNotFoundException
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
Settings.SettingNotFoundException | Thrown if a setting by the given name can't be found or the setting value is not a float. |
---|
Convenience function for retrieving a single secure settings value as an integer. Note that internally setting values are always stored as strings; this function converts the string to an integer for you. The default value will be returned if the setting is not defined or not an integer.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
def | Value to return if the setting is not defined. |
Convenience function for retrieving a single secure settings value as an integer. Note that internally setting values are always stored as strings; this function converts the string to an integer for you.
This version does not take a default value. If the setting has not
been set, or the string value is not a number,
it throws Settings.SettingNotFoundException
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
Settings.SettingNotFoundException | Thrown if a setting by the given name can't be found or the setting value is not an integer. |
---|
Convenience function for retrieving a single secure settings value
as a long
. Note that internally setting values are always
stored as strings; this function converts the string to a long
for you. The default value will be returned if the setting is
not defined or not a long
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
def | Value to return if the setting is not defined. |
long
.
Convenience function for retrieving a single secure settings value
as a long
. Note that internally setting values are always
stored as strings; this function converts the string to a long
for you.
This version does not take a default value. If the setting has not
been set, or the string value is not a number,
it throws Settings.SettingNotFoundException
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
Settings.SettingNotFoundException | Thrown if a setting by the given name can't be found or the setting value is not an integer. |
---|
Look up a name in the database.
resolver | to access the database with |
---|---|
name | to look up in the table |
Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.
name | to look up in the table |
---|
Convenience function for updating a single settings value as a floating point number. This will either create a new entry in the table if the given name does not exist, or modify the value of the existing row with that name. Note that internally setting values are always stored as strings, so this function converts the given value to a string before storing it.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to modify. |
value | The new value for the setting. |
Convenience function for updating a single settings value as an integer. This will either create a new entry in the table if the given name does not exist, or modify the value of the existing row with that name. Note that internally setting values are always stored as strings, so this function converts the given value to a string before storing it.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to modify. |
value | The new value for the setting. |
Convenience function for updating a secure settings value as a long integer. This will either create a new entry in the table if the given name does not exist, or modify the value of the existing row with that name. Note that internally setting values are always stored as strings, so this function converts the given value to a string before storing it.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to modify. |
value | The new value for the setting. |
Store a name/value pair into the database.
resolver | to access the database with |
---|---|
name | to store |
value | to associate with the name |