Android how to get current System Settings values?

deW1 picture deW1 · Mar 16, 2014 · Viewed 12.5k times · Source

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.

Answer

SilentNot picture SilentNot · Mar 16, 2014

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.