Android Question SMS Interceptor and Service

kohle

Active Member
Licensed User
Longtime User
Hi,
I have an activity and a service. the service run as foreground service.
In the service I use a sms interceptor :
Sub SI_MessageReceived (From As String, Body As String) As Boolean

The application runs fine.

When I go to the task manager and close the application, the service is
still running. If I click on the icon in the status bar the app open. Perfect.
The main activity starts again.

The problem :
When I go to the task manager and close the application, the service is
still running. Now a sms comes in.
The service close automatically, no error nothing.

I log the SI_MessageReceived event, but it dont enter anymore there.

What this can be ?


Installing file.
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
PackageAdded: package:JK.TESTApp
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (sv_control) Create **
** Service (sv_control) Start **
** Activity (main) Pause, UserClosed = false **




rgs
Jürgen
 

kohle

Active Member
Licensed User
Longtime User
Is it like this,
in the notifaction bar it shows the last notifacation of my service. This notifaction has a link
to start my app again.

When the user kill my main activity (shown in the task list) than the service is stopped
too, but the notification stays in the notifaction list.

So when a sms receive the notification list is updated and the service notifaction dont appear anymore
 
Upvote 0
Top