I want to implement a locationListener which will switch between network and GPS providers based on availability.
For example if GPS is not enabled I want it to use network but as soon as GPS is on then I want it to stop listening for location updates from network and start listening from GPS.
Similarly I want it to start listening for updates from network as soon as GPS is switched off.
Is that possible?
Subquestion
Is GPS as fast as network in providing a location fix?
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, minTime, minDistance, listener)
will only listen for updates from network and the onProviderEnabled will never get called for GPS! – Expectant