i have a service running in my app that intercepts message
main activity code
service code
everytime i received a message the messagereceived event is raised but when the app is close(swiped/killed) , the event is not being raised .. how can i make the service running even if the app main activity is not visible
main activity code
B4X:
Sub Activity_Create(FirstTime As Boolean)
StartService(smsinterceptor)
service code
B4X:
#Region Service Attributes
#StartAtBoot: True
#End Region
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_Creates
End Sub
Sub si_MessageReceived (From As String, Body As String) As Boolean
Log("SMS RECEIVED")
End Sub
Sub Service_Start (StartingIntent As Intent)
si.Initialize2("si",999)
End Sub
Sub Service_Destroy
End Sub
everytime i received a message the messagereceived event is raised but when the app is close(swiped/killed) , the event is not being raised .. how can i make the service running even if the app main activity is not visible