Some apps that have barcodes or QR codes lock brightness at full and block user changes to the brightness slider from the settings in the pulled down notification bar. One example is Starbucks on their card fragment. How can I achieve the same effect? It even works on android 10
Something like this:
WindowManager.LayoutParams params = getWindow().getAttributes();
// range from 0 to 1, specify -1 for default brightness
params.screenBrightness = 0.7f;
getWindow().setAttributes(params);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments