Hi,
I've got an Alarm Clock app, which was working fine until recently. Now, when the alarm triggers, the app is not showing the 'Snooze' screen. I know the service is triggering at the right time, as I can see from the log it keeps that that is happening, but it is not 'waking' the phone up and throwing the screen.
I have the code below, which is performed in the Activity_Create sub of my Snooze Activity.
I'm using B4A v8.3 and have a SGS9 with Android 8.0.0. The targetSDK is set to 28 in my app.
What am I missing ?
I've got an Alarm Clock app, which was working fine until recently. Now, when the alarm triggers, the app is not showing the 'Snooze' screen. I know the service is triggering at the right time, as I can see from the log it keeps that that is happening, but it is not 'waking' the phone up and throwing the screen.
I have the code below, which is performed in the Activity_Create sub of my Snooze Activity.
B4X:
Dim pws As PhoneWakeState
Dim r As Reflector
r.Target = r.GetActivity
r.Target = r.RunMethod("getWindow")
r.RunMethod2("addFlags", 6815872, "java.lang.int")
pws.KeepAlive(False)
pws.PartialLock
I'm using B4A v8.3 and have a SGS9 with Android 8.0.0. The targetSDK is set to 28 in my app.
What am I missing ?