Hello,
In my little test app I added a service module with the line #StartAtBoot: True
After new boot the service did not start.
The program catches a screen unlock and shows toastmessage "unlocked"
It should work in the background to do that until the end of times.
What am I doing wrong?
Thanks for helping me out.
My code:
In my little test app I added a service module with the line #StartAtBoot: True
After new boot the service did not start.
The program catches a screen unlock and shows toastmessage "unlocked"
It should work in the background to do that until the end of times.
What am I doing wrong?
Thanks for helping me out.
My code:
Service1:
#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