Added in API level 1

System


class System : Settings.NameValueTable
kotlin.Any
   ↳ 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.

Summary

Constants
static String

Control whether the accelerometer will be used to change screen orientation.

static String

static String

static String

static String

Persistent store for the system-wide default alarm alert.

static String

If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed.

static String

static String

Scaling factor for Animator-based animations.

static String

static String

static String

Determines whether remote devices may discover and/or connect to this device.

static String

Bluetooth discoverability timeout.

static String

static String

static String

static String

Name of an application package to be debugged.

static String

static String

Whether or not to dim the screen.

static String

CDMA only settings DTMF tone type played by the dialer when dialing.

static String

Whether the audible DTMF tones are played by the dialer when dialing.

static String

What happens when the user presses the end call button if they're not on a call.

static String

Scaling factor for fonts, float.

static String

Whether haptic feedback (Vibrate on tap) is enabled.

static String

static String

static String

static String

static String

static String

static String

static String

static String

Determines which streams are affected by ringer and zen mode changes.

static String

Determines which streams are affected by mute.

static String

static String

A formatted string of the next alarm that is set, or the empty string if there is no alarm set.

static String

Persistent store for the system-wide default notification sound.

static String

static String

static String

static String

static String

static String

static String

static String

Persistent store for the system-wide default ringtone URI.

static String

The screen backlight brightness between 0 and 255.

static String

Control whether to enable automatic brightness mode.

static Int

SCREEN_BRIGHTNESS_MODE value for automatic mode.

static Int

SCREEN_BRIGHTNESS_MODE value for manual mode.

static String

The amount of time in milliseconds before the device goes to sleep or begins to dream after a period of inactivity.

static String

static String

Whether the setup wizard has been run before (on first boot), or if it still needs to be run.

static String

static String

Control whether the process CPU usage meter should be shown.

static String

static String

Whether the sounds effects (key clicks, lid open ...) are enabled.

static String

static String

Setting to enable Auto Caps in text editors.

static String

Setting to enable Auto Punctuate in text editors.

static String

Setting to enable Auto Replace (AutoText) in text editors.

static String

Setting to showing password characters in text editors.

static String

Display the user's times, e.

static String

Scaling factor for activity transition animations.

static String

static String

Default screen rotation when no other policy applies.

static String

static String

Whether vibrate is on for different events.

static String

Whether the phone vibrates when it is ringing due to an incoming call.

static String

If 1, when launching DEBUG_APP it will wait for the debugger before starting user code.

static String

Name of activity to use for wallpaper on the home screen.

static String

static String

static String

static String

static String

static String

static String

static Int

static Int

static Int

static String

If using static IP, the primary DNS's IP address.

static String

If using static IP, the secondary DNS's IP address.

static String

If using static IP, the gateway's IP address.

static String

The static IP address.

static String

If using static IP, the net mask.

static String

Whether to use static IP and other static network attributes.

static String

static String

static String

static String

static String

static String

static String

static String

static String

static String

static String

static String

Scaling factor for normal window animations.

Inherited constants
Public constructors

Public methods
static Boolean
canWrite(context: Context!)

Checks if the specified app can modify system settings.

static Unit

Convenience function to read all of the current configuration-related settings into a Configuration object.

static Float
getFloat(cr: ContentResolver!, name: String!, def: Float)

Convenience function for retrieving a single system settings value as a floating point number.

static Float

Convenience function for retrieving a single system settings value as a float.

static Int
getInt(cr: ContentResolver!, name: String!, def: Int)

Convenience function for retrieving a single system settings value as an integer.

static Int
getInt(cr: ContentResolver!, name: String!)

Convenience function for retrieving a single system settings value as an integer.

static Long
getLong(cr: ContentResolver!, name: String!, def: Long)

Convenience function for retrieving a single system settings value as a long.

static Long

Convenience function for retrieving a single system settings value as a long.

static Boolean

static String!
getString(resolver: ContentResolver!, name: String!)

Look up a name in the database.

static Uri!
getUriFor(name: String!)

Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.

static Boolean

Convenience function to write a batch of configuration-related settings from a Configuration object.

static Boolean
putFloat(cr: ContentResolver!, name: String!, value: Float)

Convenience function for updating a single settings value as a floating point number.

static Boolean
putInt(cr: ContentResolver!, name: String!, value: Int)

Convenience function for updating a single settings value as an integer.

static Boolean
putLong(cr: ContentResolver!, name: String!, value: Long)

Convenience function for updating a single settings value as a long integer.

static Boolean
putString(resolver: ContentResolver!, name: String!, value: String!)

Store a name/value pair into the database.

static Unit

Inherited functions
Properties
static Uri!

The content:// style URL for this table

static Uri!

A Uri that will point to the current default alarm alert at any given time.

static Uri!

A Uri that will point to the current default notification sound at any given time.

static Uri!

A Uri that will point to the current default ringtone at any given time.

Constants

ACCELEROMETER_ROTATION

Added in API level 3
static val ACCELEROMETER_ROTATION: String

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.

Value: "accelerometer_rotation"

ADB_ENABLED

Added in API level 1
Deprecated in API level 15
static val ADB_ENABLED: String

Deprecated: Use android.provider.Settings.Global#ADB_ENABLED instead

Value: "adb_enabled"

AIRPLANE_MODE_ON

Added in API level 1
Deprecated in API level 17
static val AIRPLANE_MODE_ON: String

Deprecated: Use android.provider.Settings.Global#AIRPLANE_MODE_ON instead

Value: "airplane_mode_on"

AIRPLANE_MODE_RADIOS

Added in API level 1
Deprecated in API level 17
static val AIRPLANE_MODE_RADIOS: String

Deprecated: Use android.provider.Settings.Global#AIRPLANE_MODE_RADIOS instead

Value: "airplane_mode_radios"

ALARM_ALERT

Added in API level 5
static val ALARM_ALERT: String

Persistent store for the system-wide default alarm alert.

Value: "alarm_alert"

ALWAYS_FINISH_ACTIVITIES

Added in API level 1
Deprecated in API level 17
static val ALWAYS_FINISH_ACTIVITIES: String

Deprecated: Use Global#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.

Value: "always_finish_activities"

ANDROID_ID

Added in API level 1
Deprecated in API level 15
static val ANDROID_ID: String

Deprecated: Use android.provider.Settings.Secure#ANDROID_ID instead

Value: "android_id"

ANIMATOR_DURATION_SCALE

Added in API level 16
Deprecated in API level 17
static val ANIMATOR_DURATION_SCALE: String

Deprecated: Use Global#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.

Value: "animator_duration_scale"

AUTO_TIME

Added in API level 1
Deprecated in API level 17
static val AUTO_TIME: String

Deprecated: Use android.provider.Settings.Global#AUTO_TIME instead

Value: "auto_time"

AUTO_TIME_ZONE

Added in API level 11
Deprecated in API level 17
static val AUTO_TIME_ZONE: String

Deprecated: Use android.provider.Settings.Global#AUTO_TIME_ZONE instead

Value: "auto_time_zone"

BLUETOOTH_DISCOVERABILITY

Added in API level 1
static val BLUETOOTH_DISCOVERABILITY: String

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 discoverable
Value: "bluetooth_discoverability"

BLUETOOTH_DISCOVERABILITY_TIMEOUT

Added in API level 1
static val BLUETOOTH_DISCOVERABILITY_TIMEOUT: String

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.

Value: "bluetooth_discoverability_timeout"

BLUETOOTH_ON

Added in API level 1
Deprecated in API level 15
static val BLUETOOTH_ON: String

Deprecated: Use android.provider.Settings.Global#BLUETOOTH_ON instead

Value: "bluetooth_on"

DATA_ROAMING

Added in API level 1
Deprecated in API level 15
static val DATA_ROAMING: String

Deprecated: Use android.provider.Settings.Global#DATA_ROAMING instead

Value: "data_roaming"

DATE_FORMAT

Added in API level 1
Deprecated in API level 31
static val DATE_FORMAT: String

Deprecated: No longer used. Use TIME_12_24 instead.

Value: "date_format"

DEBUG_APP

Added in API level 1
Deprecated in API level 17
static val DEBUG_APP: String

Deprecated: Use Global#DEBUG_APP instead

Name of an application package to be debugged.

Value: "debug_app"

DEVICE_PROVISIONED

Added in API level 1
Deprecated in API level 15
static val DEVICE_PROVISIONED: String

Deprecated: Use android.provider.Settings.Global#DEVICE_PROVISIONED instead

Value: "device_provisioned"

DIM_SCREEN

Added in API level 1
Deprecated in API level 17
static val DIM_SCREEN: String

Deprecated: This setting is no longer used.

Whether or not to dim the screen. 0=no 1=yes

Value: "dim_screen"

DTMF_TONE_TYPE_WHEN_DIALING

Added in API level 23
static val DTMF_TONE_TYPE_WHEN_DIALING: String

CDMA only settings DTMF tone type played by the dialer when dialing. 0 = Normal 1 = Long

Value: "dtmf_tone_type"

DTMF_TONE_WHEN_DIALING

Added in API level 1
static val DTMF_TONE_WHEN_DIALING: String

Whether the audible DTMF tones are played by the dialer when dialing. The value is boolean (1 or 0).

Value: "dtmf_tone"

END_BUTTON_BEHAVIOR

Added in API level 1
static val END_BUTTON_BEHAVIOR: String

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.

Value: "end_button_behavior"

FONT_SCALE

Added in API level 1
static val FONT_SCALE: String

Scaling factor for fonts, float.

Value: "font_scale"

HAPTIC_FEEDBACK_ENABLED

Added in API level 3
Deprecated in API level 33
static val HAPTIC_FEEDBACK_ENABLED: String

Deprecated: Replaced by using android.os.VibrationAttributes#USAGE_TOUCH on vibrations. User settings are applied automatically by the service and should not be applied by individual apps.

Whether haptic feedback (Vibrate on tap) is enabled. The value is boolean (1 or 0).

Value: "haptic_feedback_enabled"

HTTP_PROXY

Added in API level 1
Deprecated in API level 15
static val HTTP_PROXY: String

Deprecated: Use android.provider.Settings.Global#HTTP_PROXY instead

Value: "http_proxy"

INSTALL_NON_MARKET_APPS

Added in API level 1
Deprecated in API level 15
static val INSTALL_NON_MARKET_APPS: String

Deprecated: Use android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS instead

Value: "install_non_market_apps"

LOCATION_PROVIDERS_ALLOWED

Added in API level 1
Deprecated in API level 15
static val LOCATION_PROVIDERS_ALLOWED: String

Deprecated: Use android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED instead

Value: "location_providers_allowed"

LOCK_PATTERN_ENABLED

Added in API level 1
Deprecated in API level 15
static val LOCK_PATTERN_ENABLED: String

Deprecated: Use android.provider.Settings.Secure#LOCK_PATTERN_ENABLED instead

Value: "lock_pattern_autolock"

LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED

Added in API level 3
Deprecated in API level 15
static val LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED: String

Deprecated: Use android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED instead

Value: "lock_pattern_tactile_feedback_enabled"

LOCK_PATTERN_VISIBLE

Added in API level 1
Deprecated in API level 15
static val LOCK_PATTERN_VISIBLE: String

Deprecated: Use android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE instead

Value: "lock_pattern_visible_pattern"

LOGGING_ID

Added in API level 1
Deprecated in API level 15
static val LOGGING_ID: String

Deprecated: Use android.provider.Settings.Secure#LOGGING_ID instead

Value: "logging_id"

MODE_RINGER

Added in API level 1
Deprecated in API level 17
static val MODE_RINGER: String

Deprecated: Use android.provider.Settings.Global#MODE_RINGER instead

Value: "mode_ringer"

MODE_RINGER_STREAMS_AFFECTED

Added in API level 1
static val MODE_RINGER_STREAMS_AFFECTED: String

Determines which streams are affected by ringer and zen mode changes. The stream type's bit should be set to 1 if it should be muted when going into an inaudible ringer mode.

Value: "mode_ringer_streams_affected"

MUTE_STREAMS_AFFECTED

Added in API level 1
static val MUTE_STREAMS_AFFECTED: String

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.

Value: "mute_streams_affected"

NETWORK_PREFERENCE

Added in API level 1
Deprecated in API level 15
static val NETWORK_PREFERENCE: String

Deprecated: Use android.provider.Settings.Global#NETWORK_PREFERENCE instead

Value: "network_preference"

NEXT_ALARM_FORMATTED

Added in API level 1
Deprecated in API level 21
static val NEXT_ALARM_FORMATTED: String

Deprecated: Use android.app.AlarmManager#getNextAlarmClock().

A formatted string of the next alarm that is set, or the empty string if there is no alarm set.

Value: "next_alarm_formatted"

NOTIFICATION_SOUND

Added in API level 1
static val NOTIFICATION_SOUND: String

Persistent store for the system-wide default notification sound.

Value: "notification_sound"

PARENTAL_CONTROL_ENABLED

Added in API level 1
Deprecated in API level 15
static val PARENTAL_CONTROL_ENABLED: String

Deprecated: Use android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED instead

Value: "parental_control_enabled"

PARENTAL_CONTROL_LAST_UPDATE

Added in API level 1
Deprecated in API level 15
static val PARENTAL_CONTROL_LAST_UPDATE: String

Deprecated: Use android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE instead

Value: "parental_control_last_update"

PARENTAL_CONTROL_REDIRECT_URL

Added in API level 1
Deprecated in API level 15
static val PARENTAL_CONTROL_REDIRECT_URL: String

Deprecated: Use android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL instead

Value: "parental_control_redirect_url"

RADIO_BLUETOOTH

Added in API level 1
Deprecated in API level 17
static val RADIO_BLUETOOTH: String

Deprecated: Use android.provider.Settings.Global#RADIO_BLUETOOTH instead

Value: "bluetooth"

RADIO_CELL

Added in API level 1
Deprecated in API level 17
static val RADIO_CELL: String

Deprecated: Use android.provider.Settings.Global#RADIO_CELL instead

Value: "cell"

RADIO_NFC

Added in API level 14
Deprecated in API level 17
static val RADIO_NFC: String

Deprecated: Use android.provider.Settings.Global#RADIO_NFC instead

Value: "nfc"

RADIO_WIFI

Added in API level 1
Deprecated in API level 17
static val RADIO_WIFI: String

Deprecated: Use android.provider.Settings.Global#RADIO_WIFI instead

Value: "wifi"

RINGTONE

Added in API level 1
static val RINGTONE: String

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.

Value: "ringtone"

SCREEN_BRIGHTNESS

Added in API level 1
static val SCREEN_BRIGHTNESS: String

The screen backlight brightness between 0 and 255.

Value: "screen_brightness"

SCREEN_BRIGHTNESS_MODE

Added in API level 8
static val SCREEN_BRIGHTNESS_MODE: String

Control whether to enable automatic brightness mode.

Value: "screen_brightness_mode"

SCREEN_BRIGHTNESS_MODE_AUTOMATIC

Added in API level 8
static val SCREEN_BRIGHTNESS_MODE_AUTOMATIC: Int

SCREEN_BRIGHTNESS_MODE value for automatic mode.

Value: 1

SCREEN_BRIGHTNESS_MODE_MANUAL

Added in API level 8
static val SCREEN_BRIGHTNESS_MODE_MANUAL: Int

SCREEN_BRIGHTNESS_MODE value for manual mode.

Value: 0

SCREEN_OFF_TIMEOUT

Added in API level 1
static val SCREEN_OFF_TIMEOUT: String

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.

This value is bounded by maximum timeout set by android.app.admin.DevicePolicyManager#setMaximumTimeToLock(ComponentName, long).

Value: "screen_off_timeout"

SETTINGS_CLASSNAME

Added in API level 1
Deprecated in API level 15
static val SETTINGS_CLASSNAME: String

Deprecated: Use android.provider.Settings.Secure#SETTINGS_CLASSNAME instead

Value: "settings_classname"

SETUP_WIZARD_HAS_RUN

Added in API level 1
static val SETUP_WIZARD_HAS_RUN: String

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

Value: "setup_wizard_has_run"

SHOW_GTALK_SERVICE_STATUS

Added in API level 1
static val SHOW_GTALK_SERVICE_STATUS: String
Value: "SHOW_GTALK_SERVICE_STATUS"

SHOW_PROCESSES

Added in API level 1
Deprecated in API level 17
static val SHOW_PROCESSES: String

Deprecated: This functionality is no longer available as of android.os.Build.VERSION_CODES#N_MR1.

Control whether the process CPU usage meter should be shown.

Value: "show_processes"

SHOW_WEB_SUGGESTIONS

Added in API level 4
Deprecated in API level 15
static val SHOW_WEB_SUGGESTIONS: String

Deprecated: Each application that shows web suggestions should have its own setting for this.

Value: "show_web_suggestions"

SOUND_EFFECTS_ENABLED

Added in API level 1
static val SOUND_EFFECTS_ENABLED: String

Whether the sounds effects (key clicks, lid open ...) are enabled. The value is boolean (1 or 0).

Value: "sound_effects_enabled"

STAY_ON_WHILE_PLUGGED_IN

Added in API level 1
Deprecated in API level 17
static val STAY_ON_WHILE_PLUGGED_IN: String

Deprecated: Use android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN instead

Value: "stay_on_while_plugged_in"

TEXT_AUTO_CAPS

Added in API level 1
static val TEXT_AUTO_CAPS: String

Setting to enable Auto Caps in text editors. 1 = On, 0 = Off

Value: "auto_caps"

TEXT_AUTO_PUNCTUATE

Added in API level 1
static val TEXT_AUTO_PUNCTUATE: String

Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This feature converts two spaces to a "." and space.

Value: "auto_punctuate"

TEXT_AUTO_REPLACE

Added in API level 1
static val TEXT_AUTO_REPLACE: String

Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off

Value: "auto_replace"

TEXT_SHOW_PASSWORD

Added in API level 1
static val TEXT_SHOW_PASSWORD: String

Setting to showing password characters in text editors. 1 = On, 0 = Off

Value: "show_password"

TIME_12_24

Added in API level 1
static val TIME_12_24: String

Display the user's times, e.g. in the status bar, as 12 or 24 hours.

  • 24 = 24 hour
  • 12 = 12 hour
  • [unset] = use the device locale's default

Value: "time_12_24"

TRANSITION_ANIMATION_SCALE

Added in API level 1
Deprecated in API level 17
static val TRANSITION_ANIMATION_SCALE: String

Deprecated: Use Global#TRANSITION_ANIMATION_SCALE instead

Scaling factor for activity transition animations. Setting to 0 will disable window animations.

Value: "transition_animation_scale"

USB_MASS_STORAGE_ENABLED

Added in API level 1
Deprecated in API level 15
static val USB_MASS_STORAGE_ENABLED: String

Deprecated: Use android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED instead

Value: "usb_mass_storage_enabled"

USER_ROTATION

Added in API level 11
static val USER_ROTATION: String

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.

Value: "user_rotation"

USE_GOOGLE_MAIL

Added in API level 1
Deprecated in API level 15
static val USE_GOOGLE_MAIL: String

Deprecated: Use android.provider.Settings.Global#USE_GOOGLE_MAIL instead

Value: "use_google_mail"

VIBRATE_ON

Added in API level 1
static val VIBRATE_ON: String

Whether vibrate is on for different events. This is used internally, changing this value will not change the vibrate. See AudioManager.

Value: "vibrate_on"

VIBRATE_WHEN_RINGING

Added in API level 23
Deprecated in API level 33
static val VIBRATE_WHEN_RINGING: String

Deprecated: Replaced by using android.os.VibrationAttributes#USAGE_RINGTONE on vibrations for incoming calls. User settings are applied automatically by the service and should not be applied by individual apps.

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.

Value: "vibrate_when_ringing"

WAIT_FOR_DEBUGGER

Added in API level 1
Deprecated in API level 17
static val WAIT_FOR_DEBUGGER: String

Deprecated: Use Global#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.

Value: "wait_for_debugger"

WALLPAPER_ACTIVITY

Added in API level 1
Deprecated in API level 17
static val WALLPAPER_ACTIVITY: String

Deprecated: Use WallpaperManager instead.

Name of activity to use for wallpaper on the home screen.

Value: "wallpaper_activity"

WIFI_MAX_DHCP_RETRY_COUNT

Added in API level 3
Deprecated in API level 15
static val WIFI_MAX_DHCP_RETRY_COUNT: String

Deprecated: Use android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT instead

Value: "wifi_max_dhcp_retry_count"

WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS

Added in API level 3
Deprecated in API level 15
static val WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS: String

Deprecated: Use android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS instead

Value: "wifi_mobile_data_transition_wakelock_timeout_ms"

WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON

Added in API level 1
Deprecated in API level 15
static val WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON: String

Deprecated: Use android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead

Value: "wifi_networks_available_notification_on"

WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY

Added in API level 1
Deprecated in API level 15
static val WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY: String

Deprecated: Use android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead

Value: "wifi_networks_available_repeat_delay"

WIFI_NUM_OPEN_NETWORKS_KEPT

Added in API level 1
Deprecated in API level 15
static val WIFI_NUM_OPEN_NETWORKS_KEPT: String

Deprecated: Use android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT instead

Value: "wifi_num_open_networks_kept"

WIFI_ON

Added in API level 1
Deprecated in API level 15
static val WIFI_ON: String

Deprecated: Use android.provider.Settings.Global#WIFI_ON instead

Value: "wifi_on"

WIFI_SLEEP_POLICY

Added in API level 3
Deprecated in API level 17
static val WIFI_SLEEP_POLICY: String

Deprecated: Use android.provider.Settings.Global#WIFI_SLEEP_POLICY instead

Value: "wifi_sleep_policy"

WIFI_SLEEP_POLICY_DEFAULT

Added in API level 3
Deprecated in API level 17
static val WIFI_SLEEP_POLICY_DEFAULT: Int

Deprecated: Use android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT instead

Value: 0

WIFI_SLEEP_POLICY_NEVER

Added in API level 3
Deprecated in API level 17
static val WIFI_SLEEP_POLICY_NEVER: Int

Deprecated: Use android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER instead

Value: 2

WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED

Added in API level 3
Deprecated in API level 17
static val WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED: Int

Deprecated: Use android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED instead

Value: 1

WIFI_STATIC_DNS1

Added in API level 1
Deprecated in API level 17
static val WIFI_STATIC_DNS1: String

Deprecated: Use WifiManager instead

If using static IP, the primary DNS's IP address.

Example: "192.168.1.1"

Value: "wifi_static_dns1"

WIFI_STATIC_DNS2

Added in API level 1
Deprecated in API level 17
static val WIFI_STATIC_DNS2: String

Deprecated: Use WifiManager instead

If using static IP, the secondary DNS's IP address.

Example: "192.168.1.2"

Value: "wifi_static_dns2"

WIFI_STATIC_GATEWAY

Added in API level 1
Deprecated in API level 17
static val WIFI_STATIC_GATEWAY: String

Deprecated: Use WifiManager instead

If using static IP, the gateway's IP address.

Example: "192.168.1.1"

Value: "wifi_static_gateway"

WIFI_STATIC_IP

Added in API level 1
Deprecated in API level 17
static val WIFI_STATIC_IP: String

Deprecated: Use WifiManager instead

The static IP address.

Example: "192.168.1.51"

Value: "wifi_static_ip"

WIFI_STATIC_NETMASK

Added in API level 1
Deprecated in API level 17
static val WIFI_STATIC_NETMASK: String

Deprecated: Use WifiManager instead

If using static IP, the net mask.

Example: "255.255.255.0"

Value: "wifi_static_netmask"

WIFI_USE_STATIC_IP

Added in API level 1
Deprecated in API level 17
static val WIFI_USE_STATIC_IP: String

Deprecated: Use WifiManager instead

Whether to use static IP and other static network attributes.

Set to 1 for true and 0 for false.

Value: "wifi_use_static_ip"

WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE instead

Value: "wifi_watchdog_acceptable_packet_loss_percentage"

WIFI_WATCHDOG_AP_COUNT

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_AP_COUNT: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT instead

Value: "wifi_watchdog_ap_count"

WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS instead

Value: "wifi_watchdog_background_check_delay_ms"

WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED instead

Value: "wifi_watchdog_background_check_enabled"

WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS instead

Value: "wifi_watchdog_background_check_timeout_ms"

WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT instead

Value: "wifi_watchdog_initial_ignored_ping_count"

WIFI_WATCHDOG_MAX_AP_CHECKS

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_MAX_AP_CHECKS: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS instead

Value: "wifi_watchdog_max_ap_checks"

WIFI_WATCHDOG_ON

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_ON: String

Deprecated: Use android.provider.Settings.Global#WIFI_WATCHDOG_ON instead

Value: "wifi_watchdog_on"

WIFI_WATCHDOG_PING_COUNT

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_PING_COUNT: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT instead

Value: "wifi_watchdog_ping_count"

WIFI_WATCHDOG_PING_DELAY_MS

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_PING_DELAY_MS: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS instead

Value: "wifi_watchdog_ping_delay_ms"

WIFI_WATCHDOG_PING_TIMEOUT_MS

Added in API level 1
Deprecated in API level 15
static val WIFI_WATCHDOG_PING_TIMEOUT_MS: String

Deprecated: Use android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS instead

Value: "wifi_watchdog_ping_timeout_ms"

WINDOW_ANIMATION_SCALE

Added in API level 1
Deprecated in API level 17
static val WINDOW_ANIMATION_SCALE: String

Deprecated: Use Global#WINDOW_ANIMATION_SCALE instead

Scaling factor for normal window animations. Setting to 0 will disable window animations.

Value: "window_animation_scale"

Public constructors

System

System()

Public methods

canWrite

Added in API level 23
static fun canWrite(context: Context!): Boolean

Checks if the specified app can modify system settings. As of API level 23, an app cannot modify system settings unless it declares the android.Manifest.permission#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 android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS, which causes the system to display a permission management screen.

Parameters
context Context!: App context.
Return
Boolean true if the calling app can write to system settings, false otherwise

getConfiguration

Added in API level 1
static fun getConfiguration(
    cr: ContentResolver!,
    outConfig: Configuration!
): Unit

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.

getFloat

Added in API level 1
static fun getFloat(
    cr: ContentResolver!,
    name: String!,
    def: Float
): Float

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.
Return
Float The setting's current value, or 'def' if it is not defined or not a valid float.

getFloat

Added in API level 1
static fun getFloat(
    cr: ContentResolver!,
    name: String!
): Float

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 SettingNotFoundException.

Parameters
cr ContentResolver!: The ContentResolver to access.
name String!: The name of the setting to retrieve.
Return
Float The setting's current value.
Exceptions
android.provider.Settings.SettingNotFoundException Thrown if a setting by the given name can't be found or the setting value is not a float.

getInt

Added in API level 1
static fun getInt(
    cr: ContentResolver!,
    name: String!,
    def: Int
): Int

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.
Return
Int The setting's current value, or 'def' if it is not defined or not a valid integer.

getInt

Added in API level 1
static fun getInt(
    cr: ContentResolver!,
    name: String!
): Int

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 SettingNotFoundException.

Parameters
cr ContentResolver!: The ContentResolver to access.
name String!: The name of the setting to retrieve.
Return
Int The setting's current value.
Exceptions
android.provider.Settings.SettingNotFoundException Thrown if a setting by the given name can't be found or the setting value is not an integer.

getLong

Added in API level 3
static fun getLong(
    cr: ContentResolver!,
    name: String!,
    def: Long
): Long

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.
Return
Long The setting's current value, or 'def' if it is not defined or not a valid long.

getLong

Added in API level 3
static fun getLong(
    cr: ContentResolver!,
    name: String!
): Long

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 SettingNotFoundException.

Parameters
cr ContentResolver!: The ContentResolver to access.
name String!: The name of the setting to retrieve.
Return
Long The setting's current value.
Exceptions
android.provider.Settings.SettingNotFoundException Thrown if a setting by the given name can't be found or the setting value is not an integer.

getShowGTalkServiceStatus

Added in API level 1
Deprecated in API level 17
static fun getShowGTalkServiceStatus(cr: ContentResolver!): Boolean

Deprecated: - Do not use

getString

Added in API level 1
static fun getString(
    resolver: ContentResolver!,
    name: String!
): String!

Look up a name in the database.

Parameters
resolver ContentResolver!: to access the database with
name String!: to look up in the table
Return
String! the corresponding value, or null if not present

getUriFor

Added in API level 1
static fun getUriFor(name: String!): Uri!

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
Return
Uri! the corresponding content URI, or null if not present

putConfiguration

Added in API level 1
static fun putConfiguration(
    cr: ContentResolver!,
    config: Configuration!
): Boolean

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.
Return
Boolean true if the values were set, false on database errors

putFloat

Added in API level 1
static fun putFloat(
    cr: ContentResolver!,
    name: String!,
    value: Float
): Boolean

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.
Return
Boolean true if the value was set, false on database errors

putInt

Added in API level 1
static fun putInt(
    cr: ContentResolver!,
    name: String!,
    value: Int
): Boolean

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.
Return
Boolean true if the value was set, false on database errors

putLong

Added in API level 3
static fun putLong(
    cr: ContentResolver!,
    name: String!,
    value: Long
): Boolean

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.
Return
Boolean true if the value was set, false on database errors

putString

Added in API level 1
static fun putString(
    resolver: ContentResolver!,
    name: String!,
    value: String!
): Boolean

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
Return
Boolean true if the value was set, false on database errors

setShowGTalkServiceStatus

Added in API level 1
Deprecated in API level 17
static fun setShowGTalkServiceStatus(
    cr: ContentResolver!,
    flag: Boolean
): Unit

Deprecated: - Do not use

Properties

CONTENT_URI

Added in API level 1
static val CONTENT_URI: Uri!

The content:// style URL for this table

DEFAULT_ALARM_ALERT_URI

Added in API level 5
static val DEFAULT_ALARM_ALERT_URI: Uri!

A Uri that will point to the current default alarm alert at any given time.

DEFAULT_NOTIFICATION_URI

Added in API level 1
static val DEFAULT_NOTIFICATION_URI: Uri!

A Uri that will point to the current default notification sound at any given time.

DEFAULT_RINGTONE_URI

Added in API level 1
static val DEFAULT_RINGTONE_URI: 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.