'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim sms1 As PhoneSms
Dim si As SmsInterceptor
Dim pe As PhoneEvents
Dim MessageFrom1 As String
Dim MessageBody1 As String
End Sub
The problem is the si_MessageRecieved is never called. What do I need to do to make it work?
Bill
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Button1 As Button
Dim EditText1 As EditText
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("main")
si.Initialize2("MessageRecieved",999)
StartService(callsms)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
'Msgbox("This is a msgbox test","A test Message-Title")
' here you send the message
EditText1.Text="xxxxxx" 'note: hid number
sms1.Send(EditText1.Text, "bal")
' show a Toast Message
ToastMessageShow("Message sent", True)
' and write log
Log("SMS Sent")
End Sub
Sub si_MessageRecieved (From As String, Body As String) As Boolean
MessageFrom1 = From
MessageBody1 = Body
ToastMessageShow(MessageBody1, True)
Msgbox("From " & From & " Text " & Body, "Title")
End Sub