I was inspired by the Costco app to try to do something to my App. For Costco, when you pull up the barcode, it maxes out screen brightness to make it easier to scan. There is nothing in the permissions for that app, so it is somehow being done programatically. I have a QR code on my app, when someone pulls up I would like to max screen brightness just on that screen for scanning '''
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
ProgressDialogHelper.showProgress(MainActivity.this);
String host = Uri.parse(request.getUrl().toString()).getHost();
urlData = request.getUrl().toString();
String upBrightness = "Link of BCODE PAGE";
if (urlData.equals(upBrightness)) {
WindowManager.LayoutParams MainActivity = getWindow().getAttributes();
MainActivity.screenBrightness = 1F;
getWindow().setAttributes(MainActivity);
}
''' I am not having any luck getting this to work, any ideas?