| java.lang.Object | ||
| ↳ | android.provider.Settings.NameValueTable | |
| ↳ | android.provider.Settings.System | |
System settings, containing miscellaneous system preferences. This table holds simple name/value pairs. There are convenience functions for accessing individual settings entries.
| 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 | ANDROID_ID | The Android ID (a unique 64-bit value) as a hex string. | |||||||||
| String | APPEND_FOR_LAST_AUDIBLE | Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change. | |||||||||
| 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 | BLUETOOTH_DISCOVERABILITY | Determines whether remote devices may discover and/or connect to this device. | |||||||||
| String | BLUETOOTH_DISCOVERABILITY_TIMEOUT | Bluetooth discoverability timeout. | |||||||||
| String | BLUETOOTH_ON | Whether bluetooth is enabled/disabled 0=disabled. | |||||||||
| Uri | CONTENT_URI | The content:// style URL for this table | |||||||||
| String | DATA_ROAMING | Whether or not data roaming is enabled. | |||||||||
| String | DATE_FORMAT | Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd | |||||||||
| String | DEBUG_APP | Name of an application package to be debugged. | |||||||||
| Uri | DEFAULT_NOTIFICATION_URI | A Uri that will point to the current default notification sound at any given time. | |||||||||
| Uri | DEFAULT_RINGTONE_URI | A Uri that will point to the current default ringtone at any given time. | |||||||||
| String | DEVICE_PROVISIONED | Whether the device has been provisioned (0 = false, 1 = true) | |||||||||
| String | DIM_SCREEN | Whether or not to dim the screen. | |||||||||
| String | DTMF_TONE_WHEN_DIALING | Whether the audible DTMF tones are played by the dialer when dialing. | |||||||||
| String | END_BUTTON_BEHAVIOR | What happens when the user presses the end call button if they're not on a call. | |||||||||
| String | FONT_SCALE | Scaling factor for fonts, float. | |||||||||
| String | HTTP_PROXY | Host name and port for a user-selected proxy. | |||||||||
| String | INSTALL_NON_MARKET_APPS | Whether the package installer should allow installation of apps downloaded from sources other than the Android Market (vending machine). | |||||||||
| String | LOCATION_PROVIDERS_ALLOWED | Comma-separated list of location providers that activities may access. | |||||||||
| String | LOCK_PATTERN_ENABLED | Whether autolock is enabled (0 = false, 1 = true) | |||||||||
| String | LOCK_PATTERN_VISIBLE | Whether lock pattern is visible as user enters (0 = false, 1 = true) | |||||||||
| String | LOGGING_ID | This constant is deprecated. This value should not be used; it is not very random and has many collisions. | |||||||||
| String | MODE_RINGER | Ringer mode. | |||||||||
| String | MODE_RINGER_STREAMS_AFFECTED | Determines which streams are affected by ringer mode changes. | |||||||||
| String | MUTE_STREAMS_AFFECTED | Determines which streams are affected by mute. | |||||||||
| String | NETWORK_PREFERENCE | User preference for which network(s) should be used. | |||||||||
| String | NEXT_ALARM_FORMATTED | A formatted string of the next alarm that is set, or the empty string if there is no alarm set. | |||||||||
| String | NOTIFICATION_SOUND | Persistent store for the system-wide default notification sound. | |||||||||
| String | PARENTAL_CONTROL_ENABLED | ||||||||||
| String | PARENTAL_CONTROL_LAST_UPDATE | ||||||||||
| String | PARENTAL_CONTROL_REDIRECT_URL | ||||||||||
| 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_WIFI | Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. | |||||||||
| String | RINGTONE | Persistent store for the system-wide default ringtone URI. | |||||||||
| String | SCREEN_BRIGHTNESS | The screen backlight brightness between 0 and 255. | |||||||||
| String | SCREEN_OFF_TIMEOUT | The timeout before the screen turns off. | |||||||||
| String | SETTINGS_CLASSNAME | Settings classname to launch when Settings is clicked from All Applications. | |||||||||
| String | SETUP_WIZARD_HAS_RUN | Whether the setup wizard has been run before (on first boot), or if it still needs to be run. | |||||||||
| String | SHOW_GTALK_SERVICE_STATUS | ||||||||||
| String | SHOW_PROCESSES | Control whether the process CPU usage meter should be shown. | |||||||||
| String | SOUND_EFFECTS_ENABLED | Whether the sounds effects (key clicks, lid open ...) are enabled. | |||||||||
| String | STAY_ON_WHILE_PLUGGED_IN | Whether we keep the device on while the device is plugged in. | |||||||||
| String | SYS_PROP_SETTING_VERSION | ||||||||||
| String | TEXT_AUTO_CAPS | Setting to enable Auto Caps in text editors. | |||||||||
| String | TEXT_AUTO_PUNCTUATE | Setting to enable Auto Punctuate in text editors. | |||||||||
| String | TEXT_AUTO_REPLACE | Setting to enable Auto Replace (AutoText) in text editors. | |||||||||
| String | TEXT_SHOW_PASSWORD | Setting to showing password characters in text editors. | |||||||||
| String | TIME_12_24 | Display times as 12 or 24 hours 12 24 | |||||||||
| 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 | VIBRATE_ON | Whether vibrate is on for different events. | |||||||||
| String | VOLUME_ALARM | Alarm volume. | |||||||||
| String | VOLUME_MUSIC | Music/media/gaming volume. | |||||||||
| String | VOLUME_RING | Ringer volume. | |||||||||
| String[] | VOLUME_SETTINGS | The mapping of stream type (integer) to its setting. | |||||||||
| String | VOLUME_SYSTEM | System/notifications volume. | |||||||||
| String | VOLUME_VOICE | Voice call volume. | |||||||||
| String | WAIT_FOR_DEBUGGER | If 1, when launching DEBUG_APP it will wait for the debugger before starting user code. | |||||||||
| String | WALLPAPER_ACTIVITY | Name of activity to use for wallpaper on the home screen. | |||||||||
| 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_STATIC_DNS1 | If using static IP, the primary DNS's IP address. | |||||||||
| String | WIFI_STATIC_DNS2 | If using static IP, the secondary DNS's IP address. | |||||||||
| String | WIFI_STATIC_GATEWAY | If using static IP, the gateway's IP address. | |||||||||
| String | WIFI_STATIC_IP | The static IP address. | |||||||||
| String | WIFI_STATIC_NETMASK | If using static IP, the net mask. | |||||||||
| String | WIFI_USE_STATIC_IP | Whether to use static IP and other static network attributes. | |||||||||
| String | WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE | The acceptable packet loss percentage (range 0 - 100) before trying another AP on the same network. | |||||||||
| String | WIFI_WATCHDOG_AP_COUNT | The number of access points required for a network in order for the watchdog to monitor it. | |||||||||
| String | WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS | The delay between background checks. | |||||||||
| String | WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED | Whether the Wi-Fi watchdog is enabled for background checking even after it thinks the user has connected to a good access point. | |||||||||
| String | WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS | The timeout for a background ping | |||||||||
| String | WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT | The number of initial pings to perform that *may* be ignored if they fail. | |||||||||
| String | WIFI_WATCHDOG_MAX_AP_CHECKS | The maximum number of access points (per network) to attempt to test. | |||||||||
| String | WIFI_WATCHDOG_ON | Whether the Wi-Fi watchdog is enabled. | |||||||||
| String | WIFI_WATCHDOG_PING_COUNT | The number of pings to test if an access point is a good connection. | |||||||||
| String | WIFI_WATCHDOG_PING_DELAY_MS | The delay between pings. | |||||||||
| String | WIFI_WATCHDOG_PING_TIMEOUT_MS | The timeout per ping. | |||||||||
| String | WINDOW_ANIMATION_SCALE | Scaling factor for normal window animations. | |||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.provider.Settings.NameValueTable
| |||||||||||
From interface
android.provider.BaseColumns
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Convenience function to read all of the current
configuration-related settings into a
Configuration object.
| |||||||||||
Convenience function for retrieving a single system settings value
as a floating point number.
| |||||||||||
Convenience function for retrieving a single system settings value
as a float.
| |||||||||||
Convenience function for retrieving a single system settings value
as an integer.
| |||||||||||
Convenience function for retrieving a single system settings value
as an integer.
| |||||||||||
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 to write a batch of configuration-related
settings from a Configuration object.
| |||||||||||
Convenience function for updating a single settings value as a
floating point number.
| |||||||||||
Convenience function for updating a single settings value as an
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.
The Android ID (a unique 64-bit value) as a hex string. Identical to that obtained by calling GoogleLoginService.getAndroidId(); it is also placed here so you can get it without binding to a service.
Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.
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
Determines whether remote devices may discover and/or connect to this device.
Type: INT
2 -- discoverable and connectable 1 -- connectable but not discoverable 0 -- neither connectable nor discoverableBluetooth discoverability timeout. If this value is nonzero, then Bluetooth becomes discoverable for a certain number of seconds, after which is becomes simply connectable. The value is in seconds.
Whether bluetooth is enabled/disabled 0=disabled. 1=enabled.
The content:// style URL for this table
Whether or not data roaming is enabled. (0 = false, 1 = true)
Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd
Name of an application package to be debugged.
A Uri that will point to the current default notification sound at any given time.
A Uri that will point to the current default ringtone at any given time.
If the current default ringtone is in the DRM provider and the caller does not have permission, the exception will be a FileNotFoundException.
Whether the device has been provisioned (0 = false, 1 = true)
Whether or not to dim the screen. 0=no 1=yes
Whether the audible DTMF tones are played by the dialer when dialing. The value is boolean (1 or 0).
What happens when the user presses the end call button if they're not
on a call.
Values:
0 - The end button does nothing.
1 - The end button goes to the home screen.
2 - The end button puts the device to sleep and locks the keyguard.
3 - The end button goes to the home screen. If the user is already on the
home screen, it puts the device to sleep.
Scaling factor for fonts, float.
Host name and port for a user-selected proxy.
Whether the package installer should allow installation of apps downloaded from sources other than the Android Market (vending machine). 1 = allow installing from other sources 0 = only allow installing from the Android Market
Comma-separated list of location providers that activities may access.
Whether autolock is enabled (0 = false, 1 = true)
Whether lock pattern is visible as user enters (0 = false, 1 = true)
This constant is deprecated.This value should not be used; it is not very random and has many collisions.
The Logging ID (a unique 64-bit value) as a hex string. Used as a pseudonymous identifier for logging.
Ringer mode. This is used internally, changing this value will not change the ringer mode. See AudioManager.
Determines which streams are affected by ringer mode changes. The stream type's bit should be set to 1 if it should be muted when going into an inaudible ringer mode.
Determines which streams are affected by mute. The stream type's bit should be set to 1 if it should be muted when a mute request is received.
User preference for which network(s) should be used. Only the connectivity service should touch this.
A formatted string of the next alarm that is set, or the empty string if there is no alarm set.
Persistent store for the system-wide default notification sound.
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 Wi-Fi radio.
Persistent store for the system-wide default ringtone URI.
If you need to play the default ringtone at any given time, it is recommended you give DEFAULT_RINGTONE_URI to the media player. It will resolve to the set default ringtone at the time of playing.
The screen backlight brightness between 0 and 255.
The timeout before the screen turns off.
Settings classname to launch when Settings is clicked from All Applications. Needed because of user testing between the old and new Settings apps. TODO: 881807
Whether the setup wizard has been run before (on first boot), or if it still needs to be run. nonzero = it has been run in the past 0 = it has not been run in the past
Control whether the process CPU usage meter should be shown.
Whether the sounds effects (key clicks, lid open ...) are enabled. The value is boolean (1 or 0).
Whether we keep the device on while the device is plugged in. 0=no 1=yes
Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This feature converts two spaces to a "." and space.
Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
Setting to showing password characters in text editors. 1 = On, 0 = Off
Display times as 12 or 24 hours 12 24
Scaling 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.
Whether vibrate is on for different events. This is used internally, changing this value will not change the vibrate. See AudioManager.
Alarm volume. This is used internally, changing this value will not change the volume. See AudioManager.
Music/media/gaming volume. This is used internally, changing this value will not change the volume. See AudioManager.
Ringer volume. This is used internally, changing this value will not change the volume. See AudioManager.
The mapping of stream type (integer) to its setting.
System/notifications volume. This is used internally, changing this value will not change the volume. See AudioManager.
Voice call volume. This is used internally, changing this value will not change the volume. See AudioManager.
If 1, when launching DEBUG_APP it will wait for the debugger before starting user code. If 0, it will run normally.
Name of activity to use for wallpaper on the home screen.
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.
If using static IP, the primary DNS's IP address.
Example: "192.168.1.1"
If using static IP, the secondary DNS's IP address.
Example: "192.168.1.2"
If using static IP, the gateway's IP address.
Example: "192.168.1.1"
The static IP address.
Example: "192.168.1.51"
If using static IP, the net mask.
Example: "255.255.255.0"
Whether to use static IP and other static network attributes.
Set to 1 for true and 0 for false.
The acceptable packet loss percentage (range 0 - 100) before trying another AP on the same network.
The number of access points required for a network in order for the watchdog to monitor it.
The delay between background checks.
Whether the Wi-Fi watchdog is enabled for background checking even after it thinks the user has connected to a good access point.
The timeout for a background ping
The number of initial pings to perform that *may* be ignored if they fail. Again, if these fail, they will *not* be used in packet loss calculation. For example, one network always seemed to time out for the first couple pings, so this is set to 3 by default.
The maximum number of access points (per network) to attempt to test. If this number is reached, the watchdog will no longer monitor the initial connection state for the network. This is a safeguard for networks containing multiple APs whose DNS does not respond to pings.
Whether the Wi-Fi watchdog is enabled.
The number of pings to test if an access point is a good connection.
The delay between pings.
The timeout per ping.
Scaling factor for normal window animations. Setting to 0 will disable window animations.
Convenience function to read all of the current configuration-related settings into a Configuration object.
| cr | The ContentResolver to access. |
|---|---|
| outConfig | Where to place the configuration settings. |
Convenience function for retrieving a single system 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 system 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 system 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 system 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. |
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 to write a batch of configuration-related settings from a Configuration object.
| cr | The ContentResolver to access. |
|---|---|
| config | The settings to write. |
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. |
Store a name/value pair into the database.
| resolver | to access the database with |
|---|---|
| name | to store |
| value | to associate with the name |