Android
android.provider
public static final class

android.provider.Settings.System

java.lang.Object
android.provider.Settings.NameValueTable BaseColumns
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

      Value  
String  ADB_ENABLED  Whether ADB is enabled.  "adb_enabled" 
String  AIRPLANE_MODE_ON  Whether Airplane Mode is on.  "airplane_mode_on" 
String  AIRPLANE_MODE_RADIOS  A comma separated list of radios that need to be disabled when airplane mode is on.  "airplane_mode_radios" 
String  ALWAYS_FINISH_ACTIVITIES  If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed.  "always_finish_activities" 
String  ANDROID_ID  The Android ID (a unique 64-bit value) as a hex string.  "android_id" 
String  APPEND_FOR_LAST_AUDIBLE  Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.  "_last_audible" 
String  AUTO_TIME  Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ).  "auto_time" 
String  BLUETOOTH_DISCOVERABILITY  Determines whether remote devices may discover and/or connect to this device.  "bluetooth_discoverability" 
String  BLUETOOTH_DISCOVERABILITY_TIMEOUT  Bluetooth discoverability timeout.  "bluetooth_discoverability_timeout" 
String  BLUETOOTH_ON  Whether bluetooth is enabled/disabled 0=disabled.  "bluetooth_on" 
Uri  CONTENT_URI  The content:// style URL for this table      
String  DATA_ROAMING  Whether or not data roaming is enabled.  "data_roaming" 
String  DATE_FORMAT  Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd   "date_format" 
String  DEBUG_APP  Name of an application package to be debugged.  "debug_app" 
Uri  DEFAULT_NOTIFICATION_URI  A Uri that will point to the current default notification sound at any given time.     
Uri  DEFAULT_RINGTONE_URI  A Uri that will point to the current default ringtone at any given time.     
String  DEVICE_PROVISIONED  Whether the device has been provisioned (0 = false, 1 = true)   "device_provisioned" 
String  DIM_SCREEN  Whether or not to dim the screen.  "dim_screen" 
String  DTMF_TONE_WHEN_DIALING  Whether the audible DTMF tones are played by the dialer when dialing.  "dtmf_tone" 
String  END_BUTTON_BEHAVIOR  What happens when the user presses the end call button if they're not on a call.  "end_button_behavior" 
String  FONT_SCALE  Scaling factor for fonts, float.  "font_scale" 
String  HTTP_PROXY  Host name and port for a user-selected proxy.  "http_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).  "install_non_market_apps" 
String  LOCATION_PROVIDERS_ALLOWED  Comma-separated list of location providers that activities may access.  "location_providers_allowed" 
String  LOCK_PATTERN_ENABLED  Whether autolock is enabled (0 = false, 1 = true)   "lock_pattern_autolock" 
String  LOCK_PATTERN_VISIBLE  Whether lock pattern is visible as user enters (0 = false, 1 = true)   "lock_pattern_visible_pattern" 
String  LOGGING_ID  The Logging ID (a unique 64-bit value) as a hex string.  "logging_id" 
String  MODE_RINGER  Ringer mode.  "mode_ringer" 
String  MODE_RINGER_STREAMS_AFFECTED  Determines which streams are affected by ringer mode changes.  "mode_ringer_streams_affected" 
String  MUTE_STREAMS_AFFECTED  Determines which streams are affected by mute.  "mute_streams_affected" 
String  NETWORK_PREFERENCE  User preference for which network(s) should be used.  "network_preference" 
String  NEXT_ALARM_FORMATTED  A formatted string of the next alarm that is set, or the empty string if there is no alarm set.  "next_alarm_formatted" 
String  NOTIFICATION_SOUND  Persistent store for the system-wide default notification sound.  "notification_sound" 
String  PARENTAL_CONTROL_ENABLED    "parental_control_enabled" 
String  PARENTAL_CONTROL_LAST_UPDATE    "parental_control_last_update" 
String  PARENTAL_CONTROL_REDIRECT_URL    "parental_control_redirect_url" 
String  RADIO_BLUETOOTH  Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.  "bluetooth" 
String  RADIO_CELL  Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.  "cell" 
String  RADIO_WIFI  Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.  "wifi" 
String  RINGTONE  Persistent store for the system-wide default ringtone URI.  "ringtone" 
String  SCREEN_BRIGHTNESS  The screen backlight brightness between 0 and 255.  "screen_brightness" 
String  SCREEN_OFF_TIMEOUT  The timeout before the screen turns off.  "screen_off_timeout" 
String  SETTINGS_CLASSNAME  Settings classname to launch when Settings is clicked from All Applications.  "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.  "setup_wizard_has_run" 
String  SHOW_GTALK_SERVICE_STATUS    "SHOW_GTALK_SERVICE_STATUS" 
String  SHOW_PROCESSES  Control whether the process CPU usage meter should be shown.  "show_processes" 
String  SOUND_EFFECTS_ENABLED  Whether the sounds effects (key clicks, lid open ...) are enabled.  "sound_effects_enabled" 
String  STAY_ON_WHILE_PLUGGED_IN  Whether we keep the device on while the device is plugged in.  "stay_on_while_plugged_in" 
String  SYS_PROP_SETTING_VERSION    "sys.settings_system_version" 
String  TEXT_AUTO_CAPS  Setting to enable Auto Caps in text editors.  "auto_caps" 
String  TEXT_AUTO_PUNCTUATE  Setting to enable Auto Punctuate in text editors.  "auto_punctuate" 
String  TEXT_AUTO_REPLACE  Setting to enable Auto Replace (AutoText) in text editors.  "auto_replace" 
String  TEXT_SHOW_PASSWORD  Setting to showing password characters in text editors.  "show_password" 
String  TIME_12_24  Display times as 12 or 24 hours 12 24   "time_12_24" 
String  TRANSITION_ANIMATION_SCALE  Scaling factor for activity transition animations.  "transition_animation_scale" 
String  USB_MASS_STORAGE_ENABLED  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.  "use_google_mail" 
String  VIBRATE_ON  Whether vibrate is on for different events.  "vibrate_on" 
String  VOLUME_ALARM  Alarm volume.  "volume_alarm" 
String  VOLUME_MUSIC  Music/media/gaming volume.  "volume_music" 
String  VOLUME_RING  Ringer volume.  "volume_ring" 
String[]  VOLUME_SETTINGS  The mapping of stream type (integer) to its setting.     
String  VOLUME_SYSTEM  System/notifications volume.  "volume_system" 
String  VOLUME_VOICE  Voice call volume.  "volume_voice" 
String  WAIT_FOR_DEBUGGER  If 1, when launching DEBUG_APP it will wait for the debugger before starting user code.  "wait_for_debugger" 
String  WALLPAPER_ACTIVITY  Name of activity to use for wallpaper on the home screen.  "wallpaper_activity" 
String  WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON  Whether to notify the user of open networks.  "wifi_networks_available_notification_on" 
String  WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY  Delay (in seconds) before repeating the Wi-Fi networks available notification.  "wifi_networks_available_repeat_delay" 
String  WIFI_NUM_OPEN_NETWORKS_KEPT  When the number of open networks exceeds this number, the least-recently-used excess networks will be removed.  "wifi_num_open_networks_kept" 
String  WIFI_ON  Whether the Wi-Fi should be on.  "wifi_on" 
String  WINDOW_ANIMATION_SCALE  Scaling factor for normal window animations.  "window_animation_scale" 
Constants inherited from class android.provider.Settings.NameValueTable
Constants inherited from interface android.provider.BaseColumns

Public Constructors

            Settings.System()

Public Methods

      static    void  getConfiguration(ContentResolver cr, Configuration outConfig)
Convenience function to read all of the current configuration-related settings into a Configuration object.
      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)
Convenience function for retrieving a single system settings value as an integer.
      static    int  getInt(ContentResolver cr, String name, int def)
Convenience function for retrieving a single system settings value as an integer.
      static    boolean  getShowGTalkServiceStatus(ContentResolver cr)
  synchronized    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 Configuration object.
      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  putString(ContentResolver resolver, String name, String value)
Store a name/value pair into the database.
      static    void  setShowGTalkServiceStatus(ContentResolver cr, boolean flag)
Methods inherited from class android.provider.Settings.NameValueTable
Methods inherited from class java.lang.Object

Details

Constants

public static final String ADB_ENABLED

Whether ADB is enabled.
Constant Value: "adb_enabled"

public static final String AIRPLANE_MODE_ON

Whether Airplane Mode is on.
Constant Value: "airplane_mode_on"

public static final String AIRPLANE_MODE_RADIOS

A comma separated list of radios that need to be disabled when airplane mode is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are included in the comma separated list.
Constant Value: "airplane_mode_radios"

public static final String ALWAYS_FINISH_ACTIVITIES

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"

public static final String ANDROID_ID

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.
Constant Value: "android_id"

public static final String APPEND_FOR_LAST_AUDIBLE

Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.
Constant Value: "_last_audible"

public static final String AUTO_TIME

Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ). 1=yes, 0=no
Constant Value: "auto_time"

public static final 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 discoverable
Constant Value: "bluetooth_discoverability"

public static final 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"

public static final String BLUETOOTH_ON

Whether bluetooth is enabled/disabled 0=disabled. 1=enabled.
Constant Value: "bluetooth_on"

public static final Uri CONTENT_URI

The content:// style URL for this table

public static final String DATA_ROAMING

Whether or not data roaming is enabled. (0 = false, 1 = true)
Constant Value: "data_roaming"

public static final String DATE_FORMAT

Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd
Constant Value: "date_format"

public static final String DEBUG_APP

Name of an application package to be debugged.
Constant Value: "debug_app"

public static final Uri DEFAULT_NOTIFICATION_URI

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

public static final 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.

public static final String DEVICE_PROVISIONED

Whether the device has been provisioned (0 = false, 1 = true)
Constant Value: "device_provisioned"

public static final String DIM_SCREEN

Whether or not to dim the screen. 0=no 1=yes
Constant Value: "dim_screen"

public static final 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"

public static final 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"

public static final String FONT_SCALE

Scaling factor for fonts, float.
Constant Value: "font_scale"

public static final String HTTP_PROXY

Host name and port for a user-selected proxy.
Constant Value: "http_proxy"

public static final String INSTALL_NON_MARKET_APPS

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
Constant Value: "install_non_market_apps"

public static final String LOCATION_PROVIDERS_ALLOWED

Comma-separated list of location providers that activities may access.
Constant Value: "location_providers_allowed"

public static final String LOCK_PATTERN_ENABLED

Whether autolock is enabled (0 = false, 1 = true)
Constant Value: "lock_pattern_autolock"

public static final String LOCK_PATTERN_VISIBLE

Whether lock pattern is visible as user enters (0 = false, 1 = true)
Constant Value: "lock_pattern_visible_pattern"

public static final String LOGGING_ID

The Logging ID (a unique 64-bit value) as a hex string. Used as a pseudonymous identifier for logging.
Constant Value: "logging_id"

public static final String MODE_RINGER

Ringer mode. This is used internally, changing this value will not change the ringer mode. See AudioManager.
Constant Value: "mode_ringer"

public static final 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"

public static final 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"

public static final String NETWORK_PREFERENCE

User preference for which network(s) should be used. Only the connectivity service should touch this.
Constant Value: "network_preference"

public static final String NEXT_ALARM_FORMATTED

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"

public static final String NOTIFICATION_SOUND

Persistent store for the system-wide default notification sound.
Constant Value: "notification_sound"

public static final String PARENTAL_CONTROL_ENABLED

Constant Value: "parental_control_enabled"

public static final String PARENTAL_CONTROL_LAST_UPDATE

Constant Value: "parental_control_last_update"

public static final String PARENTAL_CONTROL_REDIRECT_URL

Constant Value: "parental_control_redirect_url"

public static final String RADIO_BLUETOOTH

Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
Constant Value: "bluetooth"

public static final String RADIO_CELL

Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
Constant Value: "cell"

public static final String RADIO_WIFI

Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
Constant Value: "wifi"

public static final 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.

Constant Value: "ringtone"

public static final String SCREEN_BRIGHTNESS

The screen backlight brightness between 0 and 255.
Constant Value: "screen_brightness"

public static final String SCREEN_OFF_TIMEOUT

The timeout before the screen turns off.
Constant Value: "screen_off_timeout"

public static final String SETTINGS_CLASSNAME

Settings classname to launch when Settings is clicked from All Applications. Needed because of user testing between the old and new Settings apps. TODO: 881807
Constant Value: "settings_classname"

public static final 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"

public static final String SHOW_GTALK_SERVICE_STATUS

Constant Value: "SHOW_GTALK_SERVICE_STATUS"

public static final String SHOW_PROCESSES

Control whether the process CPU usage meter should be shown.
Constant Value: "show_processes"

public static final 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"

public static final String STAY_ON_WHILE_PLUGGED_IN

Whether we keep the device on while the device is plugged in. 0=no 1=yes
Constant Value: "stay_on_while_plugged_in"

public static final String SYS_PROP_SETTING_VERSION

Constant Value: "sys.settings_system_version"

public static final String TEXT_AUTO_CAPS

Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
Constant Value: "auto_caps"

public static final 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"

public static final String TEXT_AUTO_REPLACE

Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
Constant Value: "auto_replace"

public static final String TEXT_SHOW_PASSWORD

Setting to showing password characters in text editors. 1 = On, 0 = Off
Constant Value: "show_password"

public static final String TIME_12_24

Display times as 12 or 24 hours 12 24
Constant Value: "time_12_24"

public static final String TRANSITION_ANIMATION_SCALE

Scaling factor for activity transition animations. Setting to 0 will disable window animations.
Constant Value: "transition_animation_scale"

public static final String USB_MASS_STORAGE_ENABLED

USB Mass Storage Enabled
Constant Value: "usb_mass_storage_enabled"

public static final String USE_GOOGLE_MAIL

If this setting is set (to anything), then all references to Gmail on the device must change to Google Mail.
Constant Value: "use_google_mail"

public static final 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"

public static final String VOLUME_ALARM

Alarm volume. This is used internally, changing this value will not change the volume. See AudioManager.
Constant Value: "volume_alarm"

public static final String VOLUME_MUSIC

Music/media/gaming volume. This is used internally, changing this value will not change the volume. See AudioManager.
Constant Value: "volume_music"

public static final String VOLUME_RING

Ringer volume. This is used internally, changing this value will not change the volume. See AudioManager.
Constant Value: "volume_ring"

public static final String[] VOLUME_SETTINGS

The mapping of stream type (integer) to its setting.

public static final String VOLUME_SYSTEM

System/notifications volume. This is used internally, changing this value will not change the volume. See AudioManager.
Constant Value: "volume_system"

public static final String VOLUME_VOICE

Voice call volume. This is used internally, changing this value will not change the volume. See AudioManager.
Constant Value: "volume_voice"

public static final String WAIT_FOR_DEBUGGER

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"

public static final String WALLPAPER_ACTIVITY

Name of activity to use for wallpaper on the home screen.
Constant Value: "wallpaper_activity"

public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON

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.

Constant Value: "wifi_networks_available_notification_on"

public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY

Delay (in seconds) before repeating the Wi-Fi networks available notification. Connecting to a network will reset the timer.
Constant Value: "wifi_networks_available_repeat_delay"

public static final String WIFI_NUM_OPEN_NETWORKS_KEPT

When the number of open networks exceeds this number, the least-recently-used excess networks will be removed.
Constant Value: "wifi_num_open_networks_kept"

public static final String WIFI_ON

Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
Constant Value: "wifi_on"

public static final String WINDOW_ANIMATION_SCALE

Scaling factor for normal window animations. Setting to 0 will disable window animations.
Constant Value: "window_animation_scale"

Public Constructors

public Settings.System()

Public Methods

public static void getConfiguration(ContentResolver cr, Configuration outConfig)

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

Parameters

cr The ContentResolver to access.
outConfig Where to place the configuration settings.

public static 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 The ContentResolver to access.
name The name of the setting to retrieve.
def Value to return if the setting is not defined.

Returns

  • The setting's current value, or 'def' if it is not defined or not a valid float.

public static 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 The ContentResolver to access.
name The name of the setting to retrieve.

Returns

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

public static 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 The ContentResolver to access.
name The name of the setting to retrieve.

Returns

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

public static 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 The ContentResolver to access.
name The name of the setting to retrieve.
def Value to return if the setting is not defined.

Returns

  • The setting's current value, or 'def' if it is not defined or not a valid integer.

public static boolean getShowGTalkServiceStatus(ContentResolver cr)

public static synchronized String getString(ContentResolver resolver, String name)

Look up a name in the database.

Parameters

resolver to access the database with
name to look up in the table

Returns

  • the corresponding value, or null if not present

public static Uri getUriFor(String name)

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

Parameters

name to look up in the table

Returns

  • the corresponding content URI, or null if not present

public static boolean putConfiguration(ContentResolver cr, Configuration config)

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

Parameters

cr The ContentResolver to access.
config The settings to write.

Returns

  • true if the values were set, false on database errors

public static 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 The ContentResolver to access.
name The name of the setting to modify.
value The new value for the setting.

Returns

  • true if the value was set, false on database errors

public static 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 The ContentResolver to access.
name The name of the setting to modify.
value The new value for the setting.

Returns

  • true if the value was set, false on database errors

public static boolean putString(ContentResolver resolver, String name, String value)

Store a name/value pair into the database.

Parameters

resolver to access the database with
name to store
value to associate with the name

Returns

  • true if the value was set, false on database errors

public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48