I am building an app that silences the user's phone based on their location. I have been trying to find out how to keep onLocationChanged running even after the app has been closed, but I have not been able to find it. What can I do here?
How can I continue running onLocationChanged() in the background even after the app has been closed?
Asked
Active
Viewed 432 times
0
-
https://developer.android.com/guide/components/services.html – Ankit Popli Mar 25 '16 at 13:36
-
Put your onLocationChanged() code inside a service and start the service – Tabish Hussain Mar 25 '16 at 13:41
-
2http://stackoverflow.com/questions/14478179/background-service-with-location-listener-in-android The selected answer gives a pretty good idea about it. – Shubham Pandey Mar 25 '16 at 13:56
-
will the service keep running even if the user force-closes the app? – felix Mar 25 '16 at 15:24