#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim cuenta As Int
cuenta = 0
Dim hora As String
Dim N As Notification
Dim current_min,current_dia,current_control As Int
Dim current_hor As Int'String
Dim gloCelular,gloMensaje As String
End Sub
Sub Service_Create
hora = DateTime.Time(DateTime.Now)
cuenta = 0
End Sub
Sub Service_Start (StartingIntent As Intent)
cuenta = cuenta + 1
hora = DateTime.Time(DateTime.Now)
current_hor = NumberFormat(DateTime.GetHour(DateTime.Now),2,0)
current_min = NumberFormat(DateTime.GetMinute(DateTime.Now),2,0)
current_dia = DateTime.GetDayOfWeek(DateTime.Now) 'dom=7 lun=1 mar=2
ToastMessageShow("igual "&cuenta,True)
Log(cuenta)
If cuenta > 5 Then
cuenta=0
StartActivity(prueba)
'CallSub(prueba,"Activity_Create")
'CallSub(Main, "muestro1")
'CallSubDelayed2(Main, "muestro1","hola")
'CallSub
End If
StartServiceAt("", DateTime.Now + 1 * DateTime.TicksPerSecond, True) 'DateTime.TicksPerSecond
'CallSub(Main, "muestra")
'Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
End Sub
Sub Service_Destroy
N.Cancel(1)
End Sub