Settings.System.putInt(getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS, 50);
// know current brightness
try {
float curBrightnessValue=android.provider.Settings.System.getInt(
getContentResolver(), android.provider.Settings.System.SCREEN_BRIGHTNESS);
Log.d("mytesta", "memory " +curBrightnessValue );
} catch (Settings.SettingNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter