I'm not running any of this in a service so I'm a bit confused as to whether it will receive any serial data when paused. However. Using
Dim awake As PhoneWakeState
awake.KeepAlive(True)
turns the screen on to the lock screen.
Using:
Dim r As Reflector
r.Target = r.GetActivity
r.Target = r.RunMethod("getWindow")
r.RunMethod2("addFlags", 6815872, "java.lang.int")
doesn't, although the phone then stays on once I have unlocked it myself.
And I am using:
Dim pv As PhoneVibrate
pv.Vibrate(1000)
to vibrate the phone currently.
Given that the awake.KeepAlive turns the screen on it suggests to me that my subroutine is getting called (from AStream_NewData)
I can use the keepalive to keep the screen on dim until the event has occurred, which is fine, but I want to try and learn a better way.
I'll look at high importance notification but any pointers would be appreciated.