Hi,
I can detect screen on/off by using PhoneEvents but to check it for long run, I need to use service and must to display notification icon. So I want to detect it by intent with this.
Sub Service_Start (StartingIntent As Intent)
If StartingIntent.Action = "android.intent.action.SCREEN_ON" Then
Log("Screen On")
End If
If StartingIntent.Action = "android.intent.action.SCREEN_OFF" Then
Log("Screen Off")
End If
End Sub
However, it didn't work. So I need your suggestions. Thank you.
I've checked the app you've sent me. It keeps a service running all the time (and probably an activity as well) so it has no problem listening to this intent.
The process is running all the time as the drawings are made by the application. I'm not sure how exactly did this app is implemented but it doesn't have any problem monitoring the user present intent.