java.lang.Object | ||
↳ | android.provider.Settings.NameValueTable | |
↳ | android.provider.Settings.Secure |
Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ADB_ENABLED | Whether ADB is enabled. | |||||||||
String | ALLOW_MOCK_LOCATION | Setting to allow mock locations and location provider status to be injected into the LocationManager service for testing purposes during application development. | |||||||||
String | ANDROID_ID | The Android ID (a unique 64-bit value) as a hex string. | |||||||||
String | BACKGROUND_DATA | Whether background data usage is allowed by the user. | |||||||||
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 | DEFAULT_INPUT_METHOD | Setting to record the input method used by default, holding the ID of the desired method. | |||||||||
String | DEVICE_PROVISIONED | Whether the device has been provisioned (0 = false, 1 = true) | |||||||||
String | ENABLED_INPUT_METHODS | List of input methods that are currently enabled. | |||||||||
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 | LOGGING_ID | This constant is deprecated. This identifier is poorly initialized and has many collisions. It should not be used. | |||||||||
String | NETWORK_PREFERENCE | User preference for which network(s) should be used. | |||||||||
String | PARENTAL_CONTROL_ENABLED | ||||||||||
String | PARENTAL_CONTROL_LAST_UPDATE | ||||||||||
String | PARENTAL_CONTROL_REDIRECT_URL | ||||||||||
String | SETTINGS_CLASSNAME | Settings classname to launch when Settings is clicked from All Applications. | |||||||||
String | SYS_PROP_SETTING_VERSION | ||||||||||
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 | 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_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 | WIFI_WATCHDOG_WATCH_LIST | A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.provider.Settings.NameValueTable
| |||||||||||
From interface
android.provider.BaseColumns
|
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.
Setting to allow mock locations and location provider status to be injected into the LocationManager service for testing purposes during application development. These locations and status values override actual location and status information generated by network, gps, or other location providers.
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.
Whether background data usage is allowed by the user. See ConnectivityManager for more info.
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)
Setting to record the input method used by default, holding the ID of the desired method.
Whether the device has been provisioned (0 = false, 1 = true)
List of input methods that are currently enabled. This is a string containing the IDs of all enabled input methods, each ID separated by ':'.
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.
This constant is deprecated.This identifier is poorly initialized and has many collisions. It should not be used.
The Logging ID (a unique 64-bit value) as a hex string. Used as a pseudonymous identifier for logging.
User preference for which network(s) should be used. Only the connectivity service should touch this.
Settings classname to launch when Settings is clicked from All Applications. Needed because of user testing between the old and new Settings apps.
USB Mass Storage Enabled
If this setting is set (to anything), then all references to Gmail on the device must change to Google Mail.
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 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.
A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
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.
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 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 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 |