If you want continuous location updates you generally want a foregrounded service anyway...
Kris On Wed, Oct 16, 2013 at 1:42 PM, Abhilash Baddam < [email protected]> wrote: > Hi, > > I am trying to track the User current location continoulsy till he s > In my app there are two buttons *Start********* and *Stop.* > * > * > When the user clicks on button Start button, I want to track his location > continuously till he clicks on Stop button > > I am not using the any service or AlarmManager to for requesting location > updates continously. > I am trying some thing like this, > > When the user clicks on Start button, > I am requesting for location updates like this > locationManager.requestLocationUpdates( > LocationManager.GPS_PROVIDER, 0, > 100, locListener); //requests for every 100m distance > > There is a callback onLocationChanged(), in that function I am adding > location latitude and longitudes to an ArrayList. > > My doubt is even if my app is background does the onLocationChanged in my > class gets called continuously or not..? so that i can get lat and > longitudes of the user continoulsy > even if my app is in background.??? > > When the user clicks on Stop button i am removing the location updates. > > > Can anyone guide me please... > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

