[android-developers] how to track the location continously...
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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
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 android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home