Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim StartTimer As Timer
Dim x As Int = 0
Dim Notification1 As Notification
End Sub
Sub Service_Create
StartTimer.Initialize("HttpCall", 1000) '900000 = 1000*60*15(the 15 = 15 minutes)
Notification1.Initialize
Notification1.Icon ="icon"
Notification1.Vibrate =True
End Sub
Sub Service_Start (StartingIntent As Intent)
StartTimer.Enabled = True
Notification1.SetInfo("Starting to count", "Testing",Main)
Service.StartForeground(1, Notification1)
End Sub
Sub HttpCall_Tick
ToastMessageShow(x, True)
x = x + 1
If x = 60 Then
StartTimer.Enabled = False
Notification1.SetInfo("Stopped Counting", "done", Main)
Service.StopForeground(1)
ToastMessageShow("Done", True)
End If
End Sub