Hi,

Does anyone know a good example I can look at that supports:

1. Obtaining the current location "on demand" from an available
location provider
(NETWORK, GPS, both/either)

2. robustness. I'm having trouble figuring out how to manage my
location
listener's in the Android life cycle. When I switch from my app to the
settings section to enable/disable location providers, for example,
and then
switch back to my app, sometimes the listener seems to persist,
sometimes no.

Is there any accepted way to persist location listeners? For example,
how does the
onProviderDisabled(String provider), method ever fire if the listener
is killed off when
the user switches to the settings app? In my case sometimes it seems
to persist, other
times it doesn't.

Sorry, this is probably just my neophyte debugging and evolving
understanding
of the nature of the life cyle.

Enlightenment appreciated!

Best,

pawpaw17
--~--~---------~--~----~------------~-------~--~----~
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