public
static
final
class
Settings.System
extends Settings.NameValueTable
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 |
ACCELEROMETER_ROTATION
Control whether the accelerometer will be used to change screen orientation. |
String |
ADB_ENABLED
This constant was deprecated
in API level 3.
Use |
String |
AIRPLANE_MODE_ON
This constant was deprecated
in API level 17.
Use |
String |
AIRPLANE_MODE_RADIOS
This constant was deprecated
in API level 17.
Use |
String |
ALARM_ALERT
Persistent store for the system-wide default alarm alert. |
String |
ALWAYS_FINISH_ACTIVITIES
This constant was deprecated
in API level 17.
Use |
String |
ANDROID_ID
This constant was deprecated
in API level 3.
Use |
String |
ANIMATOR_DURATION_SCALE
This constant was deprecated
in API level 17.
Use |
String |
AUTO_TIME
This constant was deprecated
in API level 17.
Use |
String |
AUTO_TIME_ZONE
This constant was deprecated
in API level 17.
Use |
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
This constant was deprecated
in API level 3.
Use |
String |
DATA_ROAMING
This constant was deprecated
in API level 3.
Use |
String |
DATE_FORMAT
Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd |
String |
DEBUG_APP
This constant was deprecated
in API level 17.
Use |
String |
DEVICE_PROVISIONED
This constant was deprecated
in API level 3.
Use |
String |
DIM_SCREEN
This constant was deprecated in API level 17. This setting is no longer used. |
String |
DTMF_TONE_TYPE_WHEN_DIALING
CDMA only settings DTMF tone type played by the dialer when dialing. |
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 |
HAPTIC_FEEDBACK_ENABLED
Whether the haptic feedback (long presses, ...) are enabled. |
String |
HTTP_PROXY
This constant was deprecated
in API level 3.
Use |
String |
INSTALL_NON_MARKET_APPS
This constant was deprecated
in API level 3.
Use |
String |
LOCATION_PROVIDERS_ALLOWED
This constant was deprecated
in API level 3.
Use |
String |
LOCK_PATTERN_ENABLED
This constant was deprecated
in API level 8.
Use |
String |
LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED
This constant was deprecated
in API level 8.
Use
|
String |
LOCK_PATTERN_VISIBLE
This constant was deprecated
in API level 8.
Use |
String |
LOGGING_ID
This constant was deprecated
in API level 3.
Use |
String |
MODE_RINGER
This constant was deprecated
in API level 17.
Use |
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
This constant was deprecated
in API level 3.
Use |
String |
NEXT_ALARM_FORMATTED
This constant was deprecated
in API level 21.
Use |
String |
NOTIFICATION_SOUND
Persistent store for the system-wide default notification sound. |
String |
PARENTAL_CONTROL_ENABLED
This constant was deprecated
in API level 3.
Use |
String |
PARENTAL_CONTROL_LAST_UPDATE
This constant was deprecated
in API level 3.
Use |
String |
PARENTAL_CONTROL_REDIRECT_URL
This constant was deprecated
in API level 3.
Use |
String |
RADIO_BLUETOOTH
This constant was deprecated
in API level 17.
Use |
String |
RADIO_CELL
This constant was deprecated
in API level 17.
Use |
String |
RADIO_NFC
This constant was deprecated
in API level 17.
Use |
String |
RADIO_WIFI
This constant was deprecated
in API level 17.
Use |
String |
RINGTONE
Persistent store for the system-wide default ringtone URI. |
String |
SCREEN_BRIGHTNESS
The screen backlight brightness between 0 and 255. |
String |
SCREEN_BRIGHTNESS_MODE
Control whether to enable automatic brightness mode. |
int |
SCREEN_BRIGHTNESS_MODE_AUTOMATIC
SCREEN_BRIGHTNESS_MODE value for automatic mode. |
int |
SCREEN_BRIGHTNESS_MODE_MANUAL
SCREEN_BRIGHTNESS_MODE value for manual mode. |
String |
SCREEN_OFF_TIMEOUT
The amount of time in milliseconds before the device goes to sleep or begins to dream after a period of inactivity. |
String |
SETTINGS_CLASSNAME
This constant was deprecated
in API level 3.
Use |
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
This constant was deprecated
in API level 17.
Use |
String |
SHOW_WEB_SUGGESTIONS
This constant was deprecated in API level 11. Each application that shows web suggestions should have its own setting for this. |
String |
SOUND_EFFECTS_ENABLED
Whether the sounds effects (key clicks, lid open ...) are enabled. |
String |
STAY_ON_WHILE_PLUGGED_IN
This constant was deprecated
in API level 17.
Use |
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
This constant was deprecated
in API level 17.
Use |
String |
USB_MASS_STORAGE_ENABLED
This constant was deprecated
in API level 3.
Use |
String |
USER_ROTATION
Default screen rotation when no other policy applies. |
String |
USE_GOOGLE_MAIL
This constant was deprecated
in API level 3.
Use |
String |
VIBRATE_ON
Whether vibrate is on for different events. |
String |
VIBRATE_WHEN_RINGING
Whether the phone vibrates when it is ringing due to an incoming call. |
String |
WAIT_FOR_DEBUGGER
This constant was deprecated
in API level 17.
Use |
String |
WALLPAPER_ACTIVITY
This constant was deprecated
in API level 17.
Use |
String |
WIFI_MAX_DHCP_RETRY_COUNT
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_NUM_OPEN_NETWORKS_KEPT
This constant was deprecated
in API level 3.
Use |
String |
WIFI_ON
This constant was deprecated
in API level 3.
Use |
String |
WIFI_SLEEP_POLICY
This constant was deprecated
in API level 17.
Use |
int |
WIFI_SLEEP_POLICY_DEFAULT
This constant was deprecated
in API level 17.
Use |
int |
WIFI_SLEEP_POLICY_NEVER
This constant was deprecated
in API level 17.
Use |
int |
WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED
This constant was deprecated
in API level 17.
Use |
String |
WIFI_STATIC_DNS1
This constant was deprecated
in API level 17.
Use |
String |
WIFI_STATIC_DNS2
This constant was deprecated
in API level 17.
Use |
String |
WIFI_STATIC_GATEWAY
This constant was deprecated
in API level 17.
Use |
String |
WIFI_STATIC_IP
This constant was deprecated
in API level 17.
Use |
String |
WIFI_STATIC_NETMASK
This constant was deprecated
in API level 17.
Use |
String |
WIFI_USE_STATIC_IP
This constant was deprecated
in API level 17.
Use |
String |
WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_WATCHDOG_AP_COUNT
This constant was deprecated
in API level 3.
Use |
String |
WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT
This constant was deprecated
in API level 3.
Use
|
String |
WIFI_WATCHDOG_MAX_AP_CHECKS
This constant was deprecated
in API level 3.
Use |
String |
WIFI_WATCHDOG_ON
This constant was deprecated
in API level 3.
Use |
String |
WIFI_WATCHDOG_PING_COUNT
This constant was deprecated
in API level 3.
Use |
String |
WIFI_WATCHDOG_PING_DELAY_MS
This constant was deprecated
in API level 3.
Use |
String |
WIFI_WATCHDOG_PING_TIMEOUT_MS
This constant was deprecated
in API level 3.
Use |
String |
WINDOW_ANIMATION_SCALE
This constant was deprecated
in API level 17.
Use |
Inherited constants |
---|
From
class
android.provider.Settings.NameValueTable
|
From
interface
android.provider.BaseColumns
|
Fields | |
---|---|
public
static
final
Uri |
CONTENT_URI
The content:// style URL for this table |
public
static
final
Uri |
DEFAULT_ALARM_ALERT_URI
A |
public
static
final
Uri |
DEFAULT_NOTIFICATION_URI
A |
public
static
final
Uri |
DEFAULT_RINGTONE_URI
A |
Public constructors | |
---|---|
Settings.System()
|
Public methods | |
---|---|
static
boolean
|
canWrite(Context context)
Checks if the specified app can modify system settings. |
static
void
|
getConfiguration(ContentResolver cr, Configuration outConfig)
Convenience function to read all of the current
configuration-related settings into a
|
static
float
|
getFloat(ContentResolver cr, String name, float def)
Convenience function for retrieving a single system settings value as a floating point number. |
static
float
|
getFloat(ContentResolver cr, String name)
Convenience function for retrieving a single system settings value as a float. |
static
int
|
getInt(ContentResolver cr, String name, int def)
Convenience function for retrieving a single system settings value as an integer. |
static
int
|
getInt(ContentResolver cr, String name)
Convenience function for retrieving a single system settings value as an integer. |
static
long
|
getLong(ContentResolver cr, String name)
Convenience function for retrieving a single system settings value
as a |
static
long
|
getLong(ContentResolver cr, String name, long def)
Convenience function for retrieving a single system settings value
as a |
static
boolean
|
getShowGTalkServiceStatus(ContentResolver cr)
This method was deprecated in API level 17. - Do not use |
static
String
|
getString(ContentResolver resolver, String name)
Look up a name in the database. |
static
Uri
|
getUriFor(String name)
Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver. |
static
boolean
|
putConfiguration(ContentResolver cr, Configuration config)
Convenience function to write a batch of configuration-related
settings from a |
static
boolean
|
putFloat(ContentResolver cr, String name, float value)
Convenience function for updating a single settings value as a floating point number. |
static
boolean
|
putInt(ContentResolver cr, String name, int value)
Convenience function for updating a single settings value as an integer. |
static
boolean
|
putLong(ContentResolver cr, String name, long value)
Convenience function for updating a single settings value as a long integer. |
static
boolean
|
putString(ContentResolver resolver, String name, String value)
Store a name/value pair into the database. |
static
void
|
setShowGTalkServiceStatus(ContentResolver cr, boolean flag)
This method was deprecated in API level 17. - Do not use |
Inherited methods | |
---|---|
From
class
android.provider.Settings.NameValueTable
| |
From
class
java.lang.Object
|
String ACCELEROMETER_ROTATION
Control whether the accelerometer will be used to change screen orientation. If 0, it will not be used unless explicitly requested by the application; if 1, it will be used by default unless explicitly disabled by the application.
Constant Value: "accelerometer_rotation"
String ADB_ENABLED
This constant was deprecated
in API level 3.
Use ADB_ENABLED
instead
Constant Value: "adb_enabled"
String AIRPLANE_MODE_ON
This constant was deprecated
in API level 17.
Use AIRPLANE_MODE_ON
instead
Constant Value: "airplane_mode_on"
String AIRPLANE_MODE_RADIOS
This constant was deprecated
in API level 17.
Use AIRPLANE_MODE_RADIOS
instead
Constant Value: "airplane_mode_radios"
String ALARM_ALERT
Persistent store for the system-wide default alarm alert.
See also:
Constant Value: "alarm_alert"
String ALWAYS_FINISH_ACTIVITIES
This constant was deprecated
in API level 17.
Use ALWAYS_FINISH_ACTIVITIES
instead
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.
Constant Value: "always_finish_activities"
String ANDROID_ID
This constant was deprecated
in API level 3.
Use ANDROID_ID
instead
Constant Value: "android_id"
String ANIMATOR_DURATION_SCALE
This constant was deprecated
in API level 17.
Use ANIMATOR_DURATION_SCALE
instead
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.
Constant Value: "animator_duration_scale"
String AUTO_TIME
This constant was deprecated
in API level 17.
Use AUTO_TIME
instead
Constant Value: "auto_time"
String AUTO_TIME_ZONE
This constant was deprecated
in API level 17.
Use AUTO_TIME_ZONE
instead
Constant Value: "auto_time_zone"
String BLUETOOTH_DISCOVERABILITY
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 discoverableConstant Value: "bluetooth_discoverability"
String BLUETOOTH_DISCOVERABILITY_TIMEOUT
Bluetooth 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.
Constant Value: "bluetooth_discoverability_timeout"
String BLUETOOTH_ON
This constant was deprecated
in API level 3.
Use BLUETOOTH_ON
instead
Constant Value: "bluetooth_on"
String DATA_ROAMING
This constant was deprecated
in API level 3.
Use DATA_ROAMING
instead
Constant Value: "data_roaming"
String DATE_FORMAT
Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd
Constant Value: "date_format"
String DEBUG_APP
This constant was deprecated
in API level 17.
Use DEBUG_APP
instead
Name of an application package to be debugged.
Constant Value: "debug_app"
String DEVICE_PROVISIONED
This constant was deprecated
in API level 3.
Use DEVICE_PROVISIONED
instead
Constant Value: "device_provisioned"
String DIM_SCREEN
This constant was deprecated
in API level 17.
This setting is no longer used.
Whether or not to dim the screen. 0=no 1=yes
Constant Value: "dim_screen"
String DTMF_TONE_TYPE_WHEN_DIALING
CDMA only settings DTMF tone type played by the dialer when dialing. 0 = Normal 1 = Long
Constant Value: "dtmf_tone_type"
String DTMF_TONE_WHEN_DIALING
Whether the audible DTMF tones are played by the dialer when dialing. The value is boolean (1 or 0).
Constant Value: "dtmf_tone"
String END_BUTTON_BEHAVIOR
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.
Constant Value: "end_button_behavior"
String FONT_SCALE
Scaling factor for fonts, float.
Constant Value: "font_scale"
String HAPTIC_FEEDBACK_ENABLED
Whether the haptic feedback (long presses, ...) are enabled. The value is boolean (1 or 0).
Constant Value: "haptic_feedback_enabled"
String HTTP_PROXY
This constant was deprecated
in API level 3.
Use HTTP_PROXY
instead
Constant Value: "http_proxy"
String INSTALL_NON_MARKET_APPS
This constant was deprecated
in API level 3.
Use INSTALL_NON_MARKET_APPS
instead
Constant Value: "install_non_market_apps"
String LOCATION_PROVIDERS_ALLOWED
This constant was deprecated
in API level 3.
Use LOCATION_PROVIDERS_ALLOWED
instead
Constant Value: "location_providers_allowed"
String LOCK_PATTERN_ENABLED
This constant was deprecated
in API level 8.
Use LOCK_PATTERN_ENABLED
instead
Constant Value: "lock_pattern_autolock"
String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED
This constant was deprecated
in API level 8.
Use
LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED
instead
Constant Value: "lock_pattern_tactile_feedback_enabled"
String LOCK_PATTERN_VISIBLE
This constant was deprecated
in API level 8.
Use LOCK_PATTERN_VISIBLE
instead
Constant Value: "lock_pattern_visible_pattern"
String LOGGING_ID
This constant was deprecated
in API level 3.
Use LOGGING_ID
instead
Constant Value: "logging_id"
String MODE_RINGER
This constant was deprecated
in API level 17.
Use MODE_RINGER
instead
Constant Value: "mode_ringer"
String MODE_RINGER_STREAMS_AFFECTED
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.
Constant Value: "mode_ringer_streams_affected"
String MUTE_STREAMS_AFFECTED
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.
Constant Value: "mute_streams_affected"
String NETWORK_PREFERENCE
This constant was deprecated
in API level 3.
Use NETWORK_PREFERENCE
instead
Constant Value: "network_preference"
String NEXT_ALARM_FORMATTED
This constant was deprecated
in API level 21.
Use getNextAlarmClock()
.
A formatted string of the next alarm that is set, or the empty string if there is no alarm set.
Constant Value: "next_alarm_formatted"
String NOTIFICATION_SOUND
Persistent store for the system-wide default notification sound.
See also:
Constant Value: "notification_sound"
String PARENTAL_CONTROL_ENABLED
This constant was deprecated
in API level 3.
Use PARENTAL_CONTROL_ENABLED
instead
Constant Value: "parental_control_enabled"
String PARENTAL_CONTROL_LAST_UPDATE
This constant was deprecated
in API level 3.
Use PARENTAL_CONTROL_LAST_UPDATE
instead
Constant Value: "parental_control_last_update"
String PARENTAL_CONTROL_REDIRECT_URL
This constant was deprecated
in API level 3.
Use PARENTAL_CONTROL_REDIRECT_URL
instead
Constant Value: "parental_control_redirect_url"
String RADIO_BLUETOOTH
This constant was deprecated
in API level 17.
Use RADIO_BLUETOOTH
instead
Constant Value: "bluetooth"
String RADIO_CELL
This constant was deprecated
in API level 17.
Use RADIO_CELL
instead
Constant Value: "cell"
String RADIO_NFC
This constant was deprecated
in API level 17.
Use RADIO_NFC
instead
Constant Value: "nfc"
String RADIO_WIFI
This constant was deprecated
in API level 17.
Use RADIO_WIFI
instead
Constant Value: "wifi"
String RINGTONE
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.
See also:
Constant Value: "ringtone"
String SCREEN_BRIGHTNESS
The screen backlight brightness between 0 and 255.
Constant Value: "screen_brightness"
String SCREEN_BRIGHTNESS_MODE
Control whether to enable automatic brightness mode.
Constant Value: "screen_brightness_mode"
int SCREEN_BRIGHTNESS_MODE_AUTOMATIC
SCREEN_BRIGHTNESS_MODE value for automatic mode.
Constant Value: 1 (0x00000001)
int SCREEN_BRIGHTNESS_MODE_MANUAL
SCREEN_BRIGHTNESS_MODE value for manual mode.
Constant Value: 0 (0x00000000)
String SCREEN_OFF_TIMEOUT
The amount of time in milliseconds before the device goes to sleep or begins to dream after a period of inactivity. This value is also known as the user activity timeout period since the screen isn't necessarily turned off when it expires.
Constant Value: "screen_off_timeout"
String SETTINGS_CLASSNAME
This constant was deprecated
in API level 3.
Use SETTINGS_CLASSNAME
instead
Constant Value: "settings_classname"
String SETUP_WIZARD_HAS_RUN
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
Constant Value: "setup_wizard_has_run"
String SHOW_GTALK_SERVICE_STATUS
Constant Value: "SHOW_GTALK_SERVICE_STATUS"
String SHOW_PROCESSES
This constant was deprecated
in API level 17.
Use SHOW_PROCESSES
instead
Control whether the process CPU usage meter should be shown.
Constant Value: "show_processes"
String SHOW_WEB_SUGGESTIONS
This constant was deprecated
in API level 11.
Each application that shows web suggestions should have its own
setting for this.
Constant Value: "show_web_suggestions"
String SOUND_EFFECTS_ENABLED
Whether the sounds effects (key clicks, lid open ...) are enabled. The value is boolean (1 or 0).
Constant Value: "sound_effects_enabled"
String STAY_ON_WHILE_PLUGGED_IN
This constant was deprecated
in API level 17.
Use STAY_ON_WHILE_PLUGGED_IN
instead
Constant Value: "stay_on_while_plugged_in"
String TEXT_AUTO_CAPS
Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
Constant Value: "auto_caps"
String TEXT_AUTO_PUNCTUATE
Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This feature converts two spaces to a "." and space.
Constant Value: "auto_punctuate"
String TEXT_AUTO_REPLACE
Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
Constant Value: "auto_replace"
String TEXT_SHOW_PASSWORD
Setting to showing password characters in text editors. 1 = On, 0 = Off
Constant Value: "show_password"
String TIME_12_24
Display times as 12 or 24 hours 12 24
Constant Value: "time_12_24"
String TRANSITION_ANIMATION_SCALE
This constant was deprecated
in API level 17.
Use TRANSITION_ANIMATION_SCALE
instead
Scaling factor for activity transition animations. Setting to 0 will disable window animations.
Constant Value: "transition_animation_scale"
String USB_MASS_STORAGE_ENABLED
This constant was deprecated
in API level 3.
Use USB_MASS_STORAGE_ENABLED
instead
Constant Value: "usb_mass_storage_enabled"
String USER_ROTATION
Default screen rotation when no other policy applies.
When ACCELEROMETER_ROTATION
is zero and no on-screen Activity expresses a
preference, this rotation value will be used. Must be one of the
Surface rotation constants
.
See also:
Constant Value: "user_rotation"
String USE_GOOGLE_MAIL
This constant was deprecated
in API level 3.
Use USE_GOOGLE_MAIL
instead
Constant Value: "use_google_mail"
String VIBRATE_ON
Whether vibrate is on for different events. This is used internally, changing this value will not change the vibrate. See AudioManager.
Constant Value: "vibrate_on"
String VIBRATE_WHEN_RINGING
Whether the phone vibrates when it is ringing due to an incoming call. This will be used by Phone and Setting apps; it shouldn't affect other apps. The value is boolean (1 or 0). Note: this is not same as "vibrate on ring", which had been available until ICS. It was about AudioManager's setting and thus affected all the applications which relied on the setting, while this is purely about the vibration setting for incoming calls.
Constant Value: "vibrate_when_ringing"
String WAIT_FOR_DEBUGGER
This constant was deprecated
in API level 17.
Use WAIT_FOR_DEBUGGER
instead
If 1, when launching DEBUG_APP it will wait for the debugger before starting user code. If 0, it will run normally.
Constant Value: "wait_for_debugger"
String WALLPAPER_ACTIVITY
This constant was deprecated
in API level 17.
Use WallpaperManager
instead.
Name of activity to use for wallpaper on the home screen.
Constant Value: "wallpaper_activity"
String WIFI_MAX_DHCP_RETRY_COUNT
This constant was deprecated
in API level 3.
Use
WIFI_MAX_DHCP_RETRY_COUNT
instead
Constant Value: "wifi_max_dhcp_retry_count"
String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS
This constant was deprecated
in API level 3.
Use
WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS
instead
Constant Value: "wifi_mobile_data_transition_wakelock_timeout_ms"
String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON
This constant was deprecated
in API level 3.
Use
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON
instead
Constant Value: "wifi_networks_available_notification_on"
String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY
This constant was deprecated
in API level 3.
Use
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY
instead
Constant Value: "wifi_networks_available_repeat_delay"
String WIFI_NUM_OPEN_NETWORKS_KEPT
This constant was deprecated
in API level 3.
Use WIFI_NUM_OPEN_NETWORKS_KEPT
instead
Constant Value: "wifi_num_open_networks_kept"
String WIFI_ON
This constant was deprecated
in API level 3.
Use WIFI_ON
instead
Constant Value: "wifi_on"
String WIFI_SLEEP_POLICY
This constant was deprecated
in API level 17.
Use WIFI_SLEEP_POLICY
instead
Constant Value: "wifi_sleep_policy"
int WIFI_SLEEP_POLICY_DEFAULT
This constant was deprecated
in API level 17.
Use WIFI_SLEEP_POLICY_DEFAULT
instead
Constant Value: 0 (0x00000000)
int WIFI_SLEEP_POLICY_NEVER
This constant was deprecated
in API level 17.
Use WIFI_SLEEP_POLICY_NEVER
instead
Constant Value: 2 (0x00000002)
int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED
This constant was deprecated
in API level 17.
Use WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED
instead
Constant Value: 1 (0x00000001)
String WIFI_STATIC_DNS1
This constant was deprecated
in API level 17.
Use WifiManager
instead
If using static IP, the primary DNS's IP address.
Example: "192.168.1.1"
Constant Value: "wifi_static_dns1"
String WIFI_STATIC_DNS2
This constant was deprecated
in API level 17.
Use WifiManager
instead
If using static IP, the secondary DNS's IP address.
Example: "192.168.1.2"
Constant Value: "wifi_static_dns2"
String WIFI_STATIC_GATEWAY
This constant was deprecated
in API level 17.
Use WifiManager
instead
If using static IP, the gateway's IP address.
Example: "192.168.1.1"
Constant Value: "wifi_static_gateway"
String WIFI_STATIC_IP
This constant was deprecated
in API level 17.
Use WifiManager
instead
The static IP address.
Example: "192.168.1.51"
Constant Value: "wifi_static_ip"
String WIFI_STATIC_NETMASK
This constant was deprecated
in API level 17.
Use WifiManager
instead
If using static IP, the net mask.
Example: "255.255.255.0"
Constant Value: "wifi_static_netmask"
String WIFI_USE_STATIC_IP
This constant was deprecated
in API level 17.
Use WifiManager
instead
Whether to use static IP and other static network attributes.
Set to 1 for true and 0 for false.
Constant Value: "wifi_use_static_ip"
String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE
This constant was deprecated
in API level 3.
Use
WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE
instead
Constant Value: "wifi_watchdog_acceptable_packet_loss_percentage"
String WIFI_WATCHDOG_AP_COUNT
This constant was deprecated
in API level 3.
Use WIFI_WATCHDOG_AP_COUNT
instead
Constant Value: "wifi_watchdog_ap_count"
String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS
This constant was deprecated
in API level 3.
Use
WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS
instead
Constant Value: "wifi_watchdog_background_check_delay_ms"
String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED
This constant was deprecated
in API level 3.
Use
WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED
instead
Constant Value: "wifi_watchdog_background_check_enabled"
String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS
This constant was deprecated
in API level 3.
Use
WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS
instead
Constant Value: "wifi_watchdog_background_check_timeout_ms"
String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT
This constant was deprecated
in API level 3.
Use
WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT
instead
Constant Value: "wifi_watchdog_initial_ignored_ping_count"
String WIFI_WATCHDOG_MAX_AP_CHECKS
This constant was deprecated
in API level 3.
Use WIFI_WATCHDOG_MAX_AP_CHECKS
instead
Constant Value: "wifi_watchdog_max_ap_checks"
String WIFI_WATCHDOG_ON
This constant was deprecated
in API level 3.
Use WIFI_WATCHDOG_ON
instead
Constant Value: "wifi_watchdog_on"
String WIFI_WATCHDOG_PING_COUNT
This constant was deprecated
in API level 3.
Use WIFI_WATCHDOG_PING_COUNT
instead
Constant Value: "wifi_watchdog_ping_count"
String WIFI_WATCHDOG_PING_DELAY_MS
This constant was deprecated
in API level 3.
Use WIFI_WATCHDOG_PING_DELAY_MS
instead
Constant Value: "wifi_watchdog_ping_delay_ms"
String WIFI_WATCHDOG_PING_TIMEOUT_MS
This constant was deprecated
in API level 3.
Use WIFI_WATCHDOG_PING_TIMEOUT_MS
instead
Constant Value: "wifi_watchdog_ping_timeout_ms"
String WINDOW_ANIMATION_SCALE
This constant was deprecated
in API level 17.
Use WINDOW_ANIMATION_SCALE
instead
Scaling factor for normal window animations. Setting to 0 will disable window animations.
Constant Value: "window_animation_scale"
Uri DEFAULT_ALARM_ALERT_URI
A Uri
that will point to the current default alarm alert at
any given time.
See also:
Uri DEFAULT_NOTIFICATION_URI
A Uri
that will point to the current default notification
sound at any given time.
See also:
Uri DEFAULT_RINGTONE_URI
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.
boolean canWrite (Context context)
Checks if the specified app can modify system settings. As of API
level 23, an app cannot modify system settings unless it declares the
WRITE_SETTINGS
permission in its manifest, and the user specifically grants
the app this capability. To prompt the user to grant this approval,
the app must send an intent with the action ACTION_MANAGE_WRITE_SETTINGS
, which causes
the system to display a permission management screen.
Parameters | |
---|---|
context |
Context :
App context. |
Returns | |
---|---|
boolean |
true if the calling app can write to system settings, false otherwise |
void getConfiguration (ContentResolver cr, Configuration outConfig)
Convenience function to read all of the current
configuration-related settings into a
Configuration
object.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
outConfig |
Configuration :
Where to place the configuration settings.
|
float getFloat (ContentResolver cr, String name, float def)
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.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to retrieve. |
def |
float :
Value to return if the setting is not defined. |
Returns | |
---|---|
float |
The setting's current value, or 'def' if it is not defined or not a valid float. |
float getFloat (ContentResolver cr, String name)
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
.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to retrieve. |
Returns | |
---|---|
float |
The setting's current value. |
Throws | |
---|---|
Settings.SettingNotFoundException |
Thrown if a setting by the given name can't be found or the setting value is not a float. |
int getInt (ContentResolver cr, String name, int def)
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.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to retrieve. |
def |
int :
Value to return if the setting is not defined. |
Returns | |
---|---|
int |
The setting's current value, or 'def' if it is not defined or not a valid integer. |
int getInt (ContentResolver cr, String name)
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
.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to retrieve. |
Returns | |
---|---|
int |
The setting's current value. |
Throws | |
---|---|
Settings.SettingNotFoundException |
Thrown if a setting by the given name can't be found or the setting value is not an integer. |
long getLong (ContentResolver cr, String name)
Convenience function for retrieving a single system 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
.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to retrieve. |
Returns | |
---|---|
long |
The setting's current value. |
Throws | |
---|---|
Settings.SettingNotFoundException |
Thrown if a setting by the given name can't be found or the setting value is not an integer. |
long getLong (ContentResolver cr, String name, long def)
Convenience function for retrieving a single system 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
.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to retrieve. |
def |
long :
Value to return if the setting is not defined. |
Returns | |
---|---|
long |
The setting's current value, or 'def' if it is not defined
or not a valid long .
|
boolean getShowGTalkServiceStatus (ContentResolver cr)
This method was deprecated
in API level 17.
- Do not use
Parameters | |
---|---|
cr |
ContentResolver
|
Returns | |
---|---|
boolean |
String getString (ContentResolver resolver, String name)
Look up a name in the database.
Parameters | |
---|---|
resolver |
ContentResolver :
to access the database with |
name |
String :
to look up in the table |
Returns | |
---|---|
String |
the corresponding value, or null if not present |
Uri getUriFor (String name)
Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.
Parameters | |
---|---|
name |
String :
to look up in the table |
Returns | |
---|---|
Uri |
the corresponding content URI, or null if not present |
boolean putConfiguration (ContentResolver cr, Configuration config)
Convenience function to write a batch of configuration-related
settings from a Configuration
object.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
config |
Configuration :
The settings to write. |
Returns | |
---|---|
boolean |
true if the values were set, false on database errors |
boolean putFloat (ContentResolver cr, String name, float value)
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.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to modify. |
value |
float :
The new value for the setting. |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
boolean putInt (ContentResolver cr, String name, int value)
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.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to modify. |
value |
int :
The new value for the setting. |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
boolean putLong (ContentResolver cr, String name, long value)
Convenience function for updating a single 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.
Parameters | |
---|---|
cr |
ContentResolver :
The ContentResolver to access. |
name |
String :
The name of the setting to modify. |
value |
long :
The new value for the setting. |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
boolean putString (ContentResolver resolver, String name, String value)
Store a name/value pair into the database.
Parameters | |
---|---|
resolver |
ContentResolver :
to access the database with |
name |
String :
to store |
value |
String :
to associate with the name |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
void setShowGTalkServiceStatus (ContentResolver cr, boolean flag)
This method was deprecated
in API level 17.
- Do not use
Parameters | |
---|---|
cr |
ContentResolver
|
flag |
boolean
|