Reputation: 2402
Is there a way to track gps location even if the app is running in the background?
Upvotes: 1
Views: 2435
Reputation: 22064
Yes, create a Service
and request location updates there.
This should point you to the right direction: http://niravranpara.blogspot.se/2013/04/android-get-current-gps-location.html
@Override
public void onLocationChanged(Location location) {
// here you get location updates
// the link I gave you doesn't tell u that, but it is obvious?
}
Upvotes: 2