How can i check if screen is off (or the phone is on sleep mode)? I would like to use ScreenOff phone event but i cant find a tutorial on the same. I would like to check if phone screen is off and then perform some tasks
e.g
Dim PhoneId As PhoneId
Dim PE As PhoneEvents
PE.InitializeWithPhoneState("PE", PhoneId)
Sub PE_ScreenOff (Intent As Intent)
Log("Screen is OFF")
End Sub
Sub PE_ScreenOn (Intent As Intent)
Log("Screen is ON")
End Sub
But PE_ScreenOn is raised even when the screen is turned off!