K konisek Member Licensed User Longtime User Thursday at 7:53 PM #1 How to keep the screen always on during running my app? Before I used B4X: Dim pw As PhoneWakeState pw.KeepAlive(True) 'Display on, bright
How to keep the screen always on during running my app? Before I used B4X: Dim pw As PhoneWakeState pw.KeepAlive(True) 'Display on, bright
aminoacid Active Member Licensed User Longtime User Thursday at 11:46 PM #2 konisek said: How to keep the screen always on during running my app? Before I used B4X: Dim pw As PhoneWakeState pw.KeepAlive(True) 'Display on, bright Click to expand... It should still work. It works for me! Just make sure that "pw.KeepAlive(True)" is placed in Activity_Create Last edited: Yesterday at 12:03 AM Upvote 0
konisek said: How to keep the screen always on during running my app? Before I used B4X: Dim pw As PhoneWakeState pw.KeepAlive(True) 'Display on, bright Click to expand... It should still work. It works for me! Just make sure that "pw.KeepAlive(True)" is placed in Activity_Create
BlueVision Active Member Licensed User Longtime User Yesterday at 12:07 AM #3 Also works for me here with Android 14. One thing that has never worked for me is the direct switching between dimmed and undimmed wakelock: B4X: Dim pw As PhoneWakeState pw.KeepAlive(True) ‘Display on, bright then later at some point: (and this does not work!) B4X: pw.KeepAlive(False) ‘Display on, dimmed To make it work, you have to release the wakelock first. So the correct code is: B4X: pw.ReleaseKeepAlive pw.KeepAlive(False) ‘Display on, dimmed Upvote 0
Also works for me here with Android 14. One thing that has never worked for me is the direct switching between dimmed and undimmed wakelock: B4X: Dim pw As PhoneWakeState pw.KeepAlive(True) ‘Display on, bright then later at some point: (and this does not work!) B4X: pw.KeepAlive(False) ‘Display on, dimmed To make it work, you have to release the wakelock first. So the correct code is: B4X: pw.ReleaseKeepAlive pw.KeepAlive(False) ‘Display on, dimmed