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:
Dim pw As PhoneWakeState
pw.KeepAlive(True) ‘Display on, bright
then later at some point:
(and this does not work!)
pw.KeepAlive(False) ‘Display on, dimmed
To make it work, you have to release the wakelock first.
So the correct code is:
pw.ReleaseKeepAlive
pw.KeepAlive(False) ‘Display on, dimmed