Is there any Code I can use, so that I do not have to implement it on my own to change automatically from GPS_PROVIDER
to NETWORK_PROVIDER
?
actually I use this code:
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
But I want to do the following:
Try to use GPS, as long as it is not available use the NETWORK_PROVIDER
. But when GPS get available switch to it. When the GPS is lost switch back to the NETWORK_PROVIDER
.