javaandroidandroid-studioandroid-settingssystem-setting

Android how to get current System Settings values?


I know that I can change the Settings with:

Settings.System.putInt( getContentResolver() , 
         Settings.System.SCREEN_OFF_TIMEOUT , DELAY );

but I honestly can't find a solution on how to read the current value of that / any setting.


Solution

  • check out http://developer.android.com/reference/android/provider/Settings.System.html

    getInt(ContentResolver cr, String name, int def) Convenience function for retrieving a single system settings value as an integer.