I cannot upload the project
The problem is only the service part here it is, also here is how I call it
Sub Image_SMS_Start_Click
If ServiceModule.ServiceRunning = False Then
StartService(ServiceModule)
ServiceModule.ServiceRunning = True
Image_SMS_Start.Visible = False
Image_SMS_Stop.Visible = True
ToastMessageShow("Running in background", True)
Activity.Finish
End If
End Sub
'------------------------
'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 MessageFrom1 As String
Dim MessageBody1 As String
Dim SI As SmsInterceptor
Dim ServiceRunning As Boolean
Dim n As Notification
Dim PhoneCall As PhoneCalls
Dim PhoneNumber As String
End Sub
Sub Service_Create
End Sub
Sub Service_Start
' Dim aa As Notification
' aa.Initialize
' aa="Barrier Plus"
' Service.StartForeground(1,aa)
SI.Initialize("SI")
n.Initialize
n.Icon = "icon"
n.SetInfo("Barrier Plus", "Running in background", MainMenu)
'Change Main (above) to "" if this code is in the main module.
n.Vibrate = False
n.Notify(1)
End Sub
Sub Service_Destroy
' service.StopForeground(1)
n.Cancel(1)
End Sub
Sub SI_MessageReceived (From As String, Body As String)
MessageFrom1 = From
MessageBody1 = Body
Check_Arrived_SMS
End Sub
Sub Check_Arrived_SMS
'some code....
End Sub