Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim sNotif As Notification
End Sub
Sub Service_Create
Dim PhoneId As PhoneId
Dim PE As PhoneEvents
Dim SI As SmsInterceptor
SI.Initialize2("SI",999)
PE.InitializeWithPhoneState("PE", PhoneId)
sNotif.Initialize
sNotif.Icon = "icon"
sNotif.SetInfo("Incoming Call and SMS Record","Service Running...",Main)
sNotif.Sound = False
sNotif.Notify(1)
Service.StartForeground(1,sNotif)
End Sub
Sub Service_Start (StartingIntent As Intent)
End Sub
Sub Service_Destroy
End Sub
Sub SI_MessageReceived (From AsString, Body AsString) As Boolean
Log("MessageReceived: From = " & From & ", Body = " & Body)
Return True
End Sub
Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent)
Log("PhoneStateChanged, State = " & State & ", IncomingNumber = " & IncomingNumber)
Log(Intent.ExtrasToString)
End Sub