Hello,
I am referring to the code that Erel had kindly provided to unlock the screen when the app is visible. I have noticed that when the user has pressed the power button and shut down the screen, the code won't work again till the user has powered on the screen again.
I already have tried to clear the flags when the screen is off and run again the SetShowWhenLocked but with no success. I have tried to close the activity when the screen is off and relaunch it from a service when it is on again but with no more success.
Please, do you have any idea how to handle this and be sure the SetShowWhenLocked really unlocks the screen each time ? Many thanks
I am referring to the code that Erel had kindly provided to unlock the screen when the app is visible. I have noticed that when the user has pressed the power button and shut down the screen, the code won't work again till the user has powered on the screen again.
I already have tried to clear the flags when the screen is off and run again the SetShowWhenLocked but with no success. I have tried to close the activity when the screen is off and relaunch it from a service when it is on again but with no more success.
Please, do you have any idea how to handle this and be sure the SetShowWhenLocked really unlocks the screen each time ? Many thanks