#Region Service Attributes
#StartAtBoot: True
#End Region
Sub Process_Globals
Private PE As PhoneEvents
Dim Notification As Notification
End Sub
Sub Service_Create
Service.StartForeground(1,CreateNotification("..."))
PE.Initialize("PE")
Notification.Initialize
End Sub
Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground
End Sub
Sub PE_ScreenOn (Intent As Intent)
ToastMessageShow("Unlocked",False)
End Sub
Sub CreateNotification (Body As String) As Notification
Dim Notification As Notification
Notification.Initialize2(Notification.IMPORTANCE_LOW)
Notification.Icon = "icon"
Notification.SetInfo("TestApp", Body, Main)
Return Notification
End Sub