Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim timer1 As Timer
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim SI_FUN_know As SmsInterceptor
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim pe As PhoneEvents
pe.Initialize("PhoneEvent")
Dim Sms As PhoneSms
Sms.Send2("337xxxxxxxx","FUN?",True,True)
timer1.Initialize ("Timer1", 120000) '1000 = 1 seconde
timer1.Enabled = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Timer1_Tick
timer1.Enabled = False
Msgbox("erreur num tel ou commande","Anomalie")
Activity.Finish
End Sub
Sub SI_FUN_know_MessageReceived (From As String, Body As String) As Boolean
' SMS FUN reçu
timer1.Enabled = False
If From.Contains("337xxxxxxxx") = False Or Body.contains("FUN") = False Then
Return False
End If
Msgbox("Réception Tel : " & From & " Contenu : " & Body,"Suivi")
Return True
End Sub