Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim PE As PhoneEvents
Dim nNotify As Notification
Dim pw1 As PhoneWakeState
End Sub
Sub Service_Create
nNotify.Initialize
nNotify.Icon = "icon"
nNotify.SetInfo("Welding", "Tap to open welding", Welding)
nNotify.Sound=False
nNotify.Vibrate=False
nNotify.Light=False
nNotify.OnGoingEvent=True
Service.StartForeground(1,nNotify)
PE.Initialize ("PE")
End Sub
Sub Service_Start (StartingIntent As Intent)
pw1.KeepAlive (True)
End Sub
Sub Service_Destroy
End Sub
Sub PE_screenoff (Intent As Intent)
StartServiceAt("", DateTime.Now, True)
End Sub