Ho do I set Android system settings to dim after a set period of time.
android.provider.Settings.System.putInt(getContentResolver(),
Settings.System.DIM_SCREEN, time);
but Settings.System.DIM_SCREEN is deprecated.I also tried Power Manager PowerManager.SCREEN_DIM_WAKE_LOCK which is also deprecated Any other way around for the same.
WindowManager.LayoutParams WMLP = getWindow().getAttributes();
WMLP.screenBrightness = 0.15F;
getWindow().setAttributes(WMLP);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With