'Service module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim SI As SmsInterceptor
End Sub
Sub Service_Create
' ---- capturar sms
SI.Initialize2("SI", 999)
End Sub
Sub Service_Start (StartingIntent As Intent)
End Sub
Sub SI_MessageReceived (From As String, Body As String) As Boolean
Dim ssql As String
Dim dbSql As SQL
Dim fecha As String
Dim hora As String
DateTime.DateFormat = "yyyyMMdd" ' See this page regarding uppercase letters.
fecha= DateTime.Date(DateTime.Now)
DateTime.DateFormat = "HHmm" ' See this page regarding uppercase letters.
hora= DateTime.Date(DateTime.Now)
dbSql.Initialize( File.DirInternal,"databox.sql",False)
ssql="INSERT INTO sms('fecha','hora','tel','mensaje','visto','recibidos') VALUES('" & fecha & "','" & hora & "','" & From & "','" & Body & "',0,1)"
dbSql.ExecNonQuery(ssql)
dbSql.Close
End Sub
Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent)
End Sub
Sub Service_Destroy
End Sub