简体   繁体   中英

Android - can service be run in untill app gets uninstalled?

I need to get notified when phone contacts changed, even if my app is closed. how to do?

In my code I am starting service with START_STICKY in splash screen, but when I close the app, service also starting again.

When I change in contacts, ContentObserver class's onchange called multiple times.

And some time onchange is not being called. So how to achieve solution?

you can call your service at start up when boot completed message broadcast by android.

as explained in here Start service on boot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM