views:

340

answers:

1

I would like to sample my GPS location periodically, say, every 10 minutes. I'm assuming that the best way to do this would be to use the LocationManager class with the method:

public void requestLocationUpdates (String provider, long minTime, float minDistance, PendingIntent intent)

That would broadcast the specified intent that I could then receive in a broadcast receiver in my application. My question is, if I call this method from an activity, will the broadcasts stop when the process that called the requestLocationUpdate() is killed, or will this registration remain active so that I can continue to get location updates? Do I need to leave a service running to be able to keep the location updates coming when a user moves to different applications? Thanks!

+2  A: 
Christopher