Android Question Starter Service relaunches app when killed in task manager?

Arf

Well-Known Member
Licensed User
Longtime User
Hi,
if I minimise my app, then go to the 'recent apps' list and swipe right to kill it, it gets killed for a second and then automatically relaunches again.

I tried to add StopService(me) in Sub Service_TaskRemoved, but it still happens.

Why is starter service starting again? Log looks like this:
** Activity (main) Pause, UserClosed = false **
** Service (starter) Destroy **
*** Service (starter) Create ***
** Service (starter) Start **
** Service (unit_comms) Create **
** Service (unit_comms) Start **
** Activity (main) Create, isFirst = true **
4.628 GB
** Activity (main) Resume **
 

Arf

Well-Known Member
Licensed User
Longtime User
I just read that sticky services are re-created when app is killed from task manager, that exlains it.
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
My Starter service isn't sticky, but another service responsible for bluetooth comms is.
I think when I kill the app in task manager, my sticky comms thread is being re-launched by android and the Starter thread starts again starts due to that occurring. I think!

Working on this further today.
 
Upvote 0
Top