Light sensor response even screen locked

Hi All,

Does someone have an idea for getting light sensor response even when the the screen has been lock manually by the power button ?

In my app it appears that the Lightsensor.AverageLux or Taifunlight.Illuminance are not giving newer values when the screen has been locked.

Thanks for help

Hello Yann.

Welcome to the Forum.

That is because App Inventor 2 apps do not work as a Service. That means they do not respond while the Android screen is asleep (shuts down). What you want to do is not possible coding with App Inventor.

Regards,
Steve