Android: Stop sticky service to be recreated -


I have apps that have user login controls. When the user logs in, I want to start a service that keeps running because of a user logout. Therefore I start a service which returns the return (START_STICKY;) on my on-start commm method.

But I can not stop it after the user is logged, is there any way to do this?

I have tried to do it through the broadcast intention, but it does not stop like usual as I had guessed.

Thank you in advance

option # 1: complete service Get rid of You have not told what the service is doing, and it is possible that you do not need the service at the first place.

Option # 2: Service to stop call stopService () .


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -