App Inventor Luminance Detected : High Ambient Light is Detected Bug

I have created an app called Migraine Relief in Android Studio. What it does is, it changes your screen to green to block blue light from your screen. The problem is for some devices, they get a pop-up (check at the bottom). Saying "Luminance Detected: Hight Ambient light is detected. Do you wish to continue using Dimmer?" There is a bug as pressing on "OK" just opens up the popup again and pressing cancel closes the app and doesn't allow me to start the functionality of my app. Is there any way to prevent this popup from coming up? Because I have lost many users because of this popup issue. I could not find a proper solution for this.

N8m4N.jpg
 

codesplice

Elite Recognized Moderator
Moderator
Can you tell if this is impacting devices from a certain manufacturer? I don't recognize that popup so I'm wondering if it might be something that the manufacturer added in.
 

Bhavin Lathia

Lurker
Thread starter
Can you tell if this is impacting devices from a certain manufacturer? I don't recognize that popup so I'm wondering if it might be something that the manufacturer added in.
It actually varies over Xiaomi, Samsungs, OPPO's, and many others that have reported this bug. Basically, this popup appears when users try to run my app under a well-lit area.
 

mikedt

你好
It actually varies over Xiaomi, Samsungs, OPPO's, and many others that have reported this bug. Basically, this popup appears when users try to run my app under a well-lit area.


I'm not a dev of course, so my advice maybe limited. is your app is trying to override automatic display brightness setting, to dim the display down? Is it happening on certain Android versions, like the more recent ones, e.g. 9, 10, and 11?

One point "block blue light from your screen". Android has that built in, called "Eye Comfort" or similar, in the device's Settings. With various options for it.
 

Bhavin Lathia

Lurker
Thread starter
I'm not a dev of course, so my advice maybe limited. is your app is trying to override automatic display brightness setting, to dim the display down? Is it happening on certain Android versions, like the more recent ones, e.g. 9, 10, and 11?

One point "block blue light from your screen". Android has that built in, called "Eye Comfort" or similar, in the device's Settings. With various options for it.
That was one idea in my mind too, but before trying it out I thought let's try doing it manually and I reduced my brightness to the lowest but the popup still came, and it makes sense. The ambient light sensor detects the surrounding light and if it's too bright, it is going to show that popup. Most of the devices are Android 10 and 11 as I can see from stats. And, I know there is a built-in eye care feature in most devices. But they are targeted toward reducing eye strain and protecting eyes. The motive of my app was to help people suffering from migraines. I did good amount of research and there is a specific color of green that helps people with migraines a lot. So hence this app.
 
Top