Content Provider中的Setting.System表格内存储了很多系统属性的值,以键值对的形式存在!

可以对如下的变量进行设置

Constants
String ACCELEROMETER_ROTATION Control whether the accelerometer will be used to change screen orientation.
String ADB_ENABLED This constant is deprecated. Use ADB_ENABLED instead
String AIRPLANE_MODE_ON Whether Airplane Mode is on.
String AIRPLANE_MODE_RADIOS A comma separated list of radios that need to be disabled when airplane mode is on.
String ALARM_ALERT Persistent store for the system-wide default alarm alert.
String ALWAYS_FINISH_ACTIVITIES If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed.
String ANDROID_ID This constant is deprecated. Use ANDROID_ID instead
String APPEND_FOR_LAST_AUDIBLE Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.
String AUTO_TIME Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ).
String AUTO_TIME_ZONE Value to specify if the user prefers the time zone to be automatically fetched from the network (NITZ).
String BLUETOOTH_DISCOVERABILITY Determines whether remote devices may discover and/or connect to this device.
String BLUETOOTH_DISCOVERABILITY_TIMEOUT Bluetooth discoverability timeout.
String BLUETOOTH_ON This constant is deprecated. Use BLUETOOTH_ON instead
String DATA_ROAMING This constant is deprecated. Use DATA_ROAMING instead
String DATE_FORMAT Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd
String DEBUG_APP Name of an application package to be debugged.
String DEVICE_PROVISIONED This constant is deprecated. Use DEVICE_PROVISIONED instead
String DIM_SCREEN Whether or not to dim the screen.
String DTMF_TONE_WHEN_DIALING Whether the audible DTMF tones are played by the dialer when dialing.
String END_BUTTON_BEHAVIOR What happens when the user presses the end call button if they're not on a call.
String FONT_SCALE Scaling factor for fonts, float.
String HAPTIC_FEEDBACK_ENABLED Whether the haptic feedback (long presses, ...) are enabled.
String HTTP_PROXY This constant is deprecated. Use HTTP_PROXY instead
String INSTALL_NON_MARKET_APPS This constant is deprecated. Use INSTALL_NON_MARKET_APPS instead
String LOCATION_PROVIDERS_ALLOWED This constant is deprecated. Use LOCATION_PROVIDERS_ALLOWED instead
String LOCK_PATTERN_ENABLED This constant is deprecated. Use LOCK_PATTERN_ENABLED instead
String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED This constant is deprecated. Use LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED instead
String LOCK_PATTERN_VISIBLE This constant is deprecated. Use LOCK_PATTERN_VISIBLE instead
String LOGGING_ID This constant is deprecated. Use LOGGING_ID instead
String MODE_RINGER Ringer mode.
String MODE_RINGER_STREAMS_AFFECTED Determines which streams are affected by ringer mode changes.
String MUTE_STREAMS_AFFECTED Determines which streams are affected by mute.
String NETWORK_PREFERENCE This constant is deprecated. Use NETWORK_PREFERENCE instead
String NEXT_ALARM_FORMATTED A formatted string of the next alarm that is set, or the empty string if there is no alarm set.
String NOTIFICATION_SOUND Persistent store for the system-wide default notification sound.
String PARENTAL_CONTROL_ENABLED This constant is deprecated. Use PARENTAL_CONTROL_ENABLED instead
String PARENTAL_CONTROL_LAST_UPDATE This constant is deprecated. Use PARENTAL_CONTROL_LAST_UPDATE instead
String PARENTAL_CONTROL_REDIRECT_URL This constant is deprecated. Use PARENTAL_CONTROL_REDIRECT_URL instead
String RADIO_BLUETOOTH Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
String RADIO_CELL Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
String RADIO_NFC Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio.
String RADIO_WIFI Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
String RINGTONE Persistent store for the system-wide default ringtone URI.
String SCREEN_BRIGHTNESS The screen backlight brightness between 0 and 255.
String SCREEN_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 timeout before the screen turns off.
String SETTINGS_CLASSNAME This constant is deprecated. Use SETTINGS_CLASSNAME instead
String SETUP_WIZARD_HAS_RUN Whether the setup wizard has been run before (on first boot), or if it still needs to be run.
String SHOW_GTALK_SERVICE_STATUS  
String SHOW_PROCESSES Control whether the process CPU usage meter should be shown.
String SHOW_WEB_SUGGESTIONS This constant is deprecated. 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 Whether we keep the device on while the device is plugged in.
String SYS_PROP_SETTING_VERSION  
String TEXT_AUTO_CAPS Setting to enable Auto Caps in text editors.
String TEXT_AUTO_PUNCTUATE Setting to enable Auto Punctuate in text editors.
String TEXT_AUTO_REPLACE Setting to enable Auto Replace (AutoText) in text editors.
String TEXT_SHOW_PASSWORD Setting to showing password characters in text editors.
String TIME_12_24 Display times as 12 or 24 hours 12 24
String TRANSITION_ANIMATION_SCALE Scaling factor for activity transition animations.
String USB_MASS_STORAGE_ENABLED This constant is deprecated. Use USB_MASS_STORAGE_ENABLED instead
String USER_ROTATION Default screen rotation when no other policy applies.
String USE_GOOGLE_MAIL This constant is deprecated. Use USE_GOOGLE_MAIL instead
String VIBRATE_ON Whether vibrate is on for different events.
String VOLUME_ALARM Alarm volume.
String VOLUME_BLUETOOTH_SCO Bluetooth Headset volume.
String VOLUME_MUSIC Music/media/gaming volume.
String VOLUME_NOTIFICATION Notification volume.
String VOLUME_RING Ringer volume.
String VOLUME_SYSTEM System/notifications volume.
String VOLUME_VOICE Voice call volume.
String WAIT_FOR_DEBUGGER If 1, when launching DEBUG_APP it will wait for the debugger before starting user code.
String WALLPAPER_ACTIVITY Name of activity to use for wallpaper on the home screen.
String WIFI_MAX_DHCP_RETRY_COUNT This constant is deprecated. Use WIFI_MAX_DHCP_RETRY_COUNT instead
String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS This constant is deprecated. Use WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS instead
String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON This constant is deprecated. Use WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead
String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY This constant is deprecated. Use WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead
String WIFI_NUM_OPEN_NETWORKS_KEPT This constant is deprecated. Use WIFI_NUM_OPEN_NETWORKS_KEPT instead
String WIFI_ON This constant is deprecated. Use WIFI_ON instead
String WIFI_SLEEP_POLICY The policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).
int WIFI_SLEEP_POLICY_DEFAULT Value for WIFI_SLEEP_POLICY to use the default Wi-Fi sleep policy, which is to sleep shortly after the turning off according to the STAY_ON_WHILE_PLUGGED_IN setting.
int WIFI_SLEEP_POLICY_NEVER Value for WIFI_SLEEP_POLICY to never go to sleep.
int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED Value for WIFI_SLEEP_POLICY to use the default policy when the device is on battery, and never go to sleep when the device is plugged in.
String WIFI_STATIC_DNS1 If using static IP, the primary DNS's IP address.
String WIFI_STATIC_DNS2 If using static IP, the secondary DNS's IP address.
String WIFI_STATIC_GATEWAY If using static IP, the gateway's IP address.
String WIFI_STATIC_IP The static IP address.
String WIFI_STATIC_NETMASK If using static IP, the net mask.
String WIFI_USE_STATIC_IP Whether to use static IP and other static network attributes.
String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE This constant is deprecated. Use WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE instead
String WIFI_WATCHDOG_AP_COUNT This constant is deprecated. Use WIFI_WATCHDOG_AP_COUNT instead
String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS This constant is deprecated. Use WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS instead
String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED This constant is deprecated. Use WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED instead
String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS This constant is deprecated. Use WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS instead
String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT This constant is deprecated. Use WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT instead
String WIFI_WATCHDOG_MAX_AP_CHECKS This constant is deprecated. Use WIFI_WATCHDOG_MAX_AP_CHECKS instead
String WIFI_WATCHDOG_ON This constant is deprecated. Use WIFI_WATCHDOG_ON instead
String WIFI_WATCHDOG_PING_COUNT This constant is deprecated. Use WIFI_WATCHDOG_PING_COUNT instead
String WIFI_WATCHDOG_PING_DELAY_MS This constant is deprecated. Use WIFI_WATCHDOG_PING_DELAY_MS instead
String WIFI_WATCHDOG_PING_TIMEOUT_MS This constant is deprecated. Use WIFI_WATCHDOG_PING_TIMEOUT_MS instead
String WINDOW_ANIMATION_SCALE Scaling factor for normal window animations.

通过如下的函数可以对其进行读写:

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 long getLong( ContentResolver cr, String name, long def)

Convenience function for retrieving a single system settings value as a long.
static long getLong( ContentResolver cr, String name)

Convenience function for retrieving a single system settings value as a long.
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 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)

注意,应用程序中应加入: <uses-permission android:name="android.permission.WRITE_SETTINGS" />

Android中的android.provider.Settings.System系统属性设定相关推荐

  1. android alarmmanager进程,Android中使用AlarmManager需注意设置进程属性

    Android中使用AlarmManager需注意设置进程属性 在Android中,AlarmManager提供了不受休眠状态的系统定时功能,其一般使用方法如下. 1.创建一个BroadcastRec ...

  2. Android 中怎么重启APP、重启系统

    重新启动应用程序,有两种方法,分别是: 1.通过ActivityManager来重新启动应用程序: ActivityManager manager = (ActivityManager)this.ge ...

  3. Android 使用反射机制获取或设置系统属性(SystemProperties)

    网上有很多介绍,但是感觉比较混乱!由于自己能力有限,只做一些简单易懂的介绍. 一.获取和设置SystemProperties属性的代码 下面是通过反射来获取和设置系统属性的代码 public fina ...

  4. java除了android,Java中是否有类似android中的android.os.Handler的类?

    没有一个默认.但是你可以让自己的自定义类来做类似的事情. 我做了一个这样的: import java.util.ArrayList; public class Handler extends Obje ...

  5. Android中的Android中的Surface和SurfaceView

    一.什么是Surface 简单的说Surface对应了一块屏幕缓冲区,每个window对应一个Surface,任何View都要画在Surface上.传统的view共享一块屏幕缓冲区,所有的绘制必须在U ...

  6. Android中使用Intent的Action和Data属性实现点击按钮跳转到拨打电话和发送短信

    场景 点击拨打电话按钮,跳转到拨打电话页面 点击发送短信按钮,跳转到发送短信页面 注: 博客: https://blog.csdn.net/badao_liumang_qizhi 关注公众号 霸道的程 ...

  7. Android 中在Android studio2.3中 NASA 的World Wind地图应用

    World Wind的官方网站:链接 百度百科 World Wind(简称WW,中文民间直译为世界风),是NASA发布的一个开放源代码(Open Source)的地理科普软件(由NASA Resear ...

  8. android中CheckBox的高级应用之button属性

    在我们普通的应用中checkBox里有多个Item时,页面中会自动为我们提供复选框的按钮,但我们有时会遇到这要的情况,CheckBox应用的对象不需要多个Item而是每个CheckBox对应平行的每一 ...

  9. android蓝牙错误码8,如何解决BluetoothGatt:Android中发生android.os.DeadObjectException错误?...

    我按照页面Bluetooth Low Energy开发Android 4.3的蓝牙低功耗. 我已经可以打开蓝牙,扫描设备并连接到BLE设备. 但是,在尝试连接到device(device.connec ...

最新文章

  1. 制作win2000能用的 schtasks.exe
  2. Quartz2.2.1开发问题
  3. Opencv-python 3.3版本安装
  4. pymongo 使用测试
  5. spring-注解---IOC(3)
  6. Spring Boot 最佳实践
  7. 将下列数组中奇数和偶数分别存放于两个不同的两个数组
  8. 微信小程序订票选座PHP后台网站MySQL数据库和无前端小程序版本两个程序
  9. 从0成为Facebook广告高手系列教程,Facebook广告数据分析上篇
  10. 贺利坚老师汇编课程39笔记:用于内存寻址的寄存器同时引入BP
  11. 练习:----计算阶乘按钮
  12. 新增字段属性“是否转义”,提高列表展示性能
  13. 7月5日服务器临时维护更新公告,封印战记7月5日更新什么? 7月5日临时更新维护公告...
  14. 数据库课程设计基础需求
  15. 智能网联V2X全球发展现状以及V2X平台设计简介
  16. java 发送notes_JAVA使用B/S模式(网页)发送Notes邮件
  17. web buuctf [0CTF 2016]piapiapia
  18. 从菜鸟到大神之自动化测试(基础一)
  19. hive练习题(二)计算用户的复购率和回购率
  20. 关于荧光染料(FITC、RB罗丹明、Cy3,Cy3.5,Cy5,Cy5.5,Cy7,Cy7.5)

热门文章

  1. 苹果恢复出厂设置好吗_还原手机和恢复出厂设置一样吗?原来有这么大的区别...
  2. c++的3D游戏笔录-基于panda3d(3)
  3. linux局域网语音通讯软件下载,基于Linux平台的局域网可语音的IM软件的设计与实现.doc...
  4. 绝对零基础的C语言科班作业⑦(数组)(斐波那契数列)(冒泡排序)
  5. matlab 多普勒效应,《利用MATLAB仿真多普勒效应.doc
  6. 广州职业技术学校一览表|广州技校大全
  7. 视频教程-C#6.0编程语言:基础语法视频教程-C#
  8. CE5.0/CE6.0下支持手写输入
  9. 计算机在护士行业的应用情况,【医院护理论文】医院护理信息化实施的现状及未来分析(共3632字)...
  10. 从单体应用转型为SaaS模式,Amazon SaaS Boost来搞定!