Note, that the screen is on?

schimanski

Well-Known Member
Licensed User
Longtime User
Hello!

I have made a mode,which sets the screen off with the hardware-lib and activate a keylock. With one hardware-button, the screen gets on and the keylock will be disabled again. On every device I have tested it, it is possible to set the screen off. But on some devices (for example HTC Touch Diamond), it is not possible to turn the screen on with the hardware-lib. So it is necessary to press the powerbutton (on/off) of the device. After that, the screen turns on, but the keylock is always activated. Is there a way to check if the screen is on or perhaps if the powerbutton has been pressed?

Thanks for answers....
 

schimanski

Well-Known Member
Licensed User
Longtime User
Hello Erel

I turn the screen off with the PowerNotify-dll:

B4X:
PowerNotify.ScreenOff

It runs on every device!

I turn the screen on again with the hardware-lib:

B4X:
hardware.ScreenOn


It is not possible to turn the screen off over the powerbutton, because some devices will break the GPS-connection.
 
Top