get notified if locationprovider is enabled/disabled

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

get notified if locationprovider is enabled/disabled

Postby eppinator » Tue Apr 13, 2010 2:40 pm

Is there a way to get notified if one of the LocationProviders is enabled/disabled by the user (during running of the application)?

I don't want to use the methods in LocationListener (onProviderEnabled / onProviderDisabled) because they work only if I have already registered a listener. But I want notification about availability of the provider independent of registering the listeners...

Any ideas?
Maybe via BrodcastReceiver? (but didn't find a matching intent)
The worst solution would be a polling on LocationManager.isProviderEnabled, but I would avoid that if possible...

Thanks and regards
eppinator
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Feb 11, 2010 1:00 pm

Top

Postby eppinator » Mon Apr 26, 2010 9:16 am

*push*
no ideas? :(
eppinator
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Feb 11, 2010 1:00 pm

Postby nicholas.hauschild » Mon Apr 26, 2010 1:33 pm

Hello Eppinator,

Wihtout registering a Listener, I would imagine that your best bet would be to make a call to getXXXProvider every so often. Not ideal, but it is a suggestion...

Good luck
-Nick
nicholas.hauschild
Master Developer
Master Developer
 
Posts: 310
Joined: Fri Dec 04, 2009 4:50 am

Top

Return to Map Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests