Reputation: 33
I'm relatively new to using location services in Android, and I am wondering how it is possible to have my app check my location (without opening the app) and executing some code, for example based on if my latitude or longitude is greater than 50. Is there a common way of running the app (including location services) in the background?
Upvotes: 2
Views: 1785
Reputation: 3620
What you are looking for is to build an Android Service
Service is a program that runs in the background and can do all kind of tasks including accessing the location services
Check out the code published here for a detailed answer.
Upvotes: 1