Are you calling removeUpdates(yourLocationListener) on your
LocationManager in each Activity's onPause()? You must do this or else
you will end up with LocationListeners that never end and even after
your app's runtime is over your listeners will eat the user's battery
life.

http://developer.android.com/reference/android/location/LocationManager.html#removeUpdates(android.location.LocationListener)

Hope this helps,
Nick


On Apr 15, 11:23 pm, sujit panda <sujit.andr...@gmail.com> wrote:
> Hi,
> I am working on an Location Based Application. In this application i
> am using LocationListener class to update the location when the
> Location is changed.In each Activity i have different
> LocationListener  to update location and do some specific work on
> updated location. But my problem is that when i am changing my
> location through DDMS , the LocationListener is being called of that
> current Activity as well as all the activities of the whole
> application where LocationListener has been defined. I don't know
> whether there should be one LocationListener for the whole application
> or for each Activity we should have different LocationListener.
>
> Please help me......Its urgent..........Thanks in Advance.....
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to