I'm using following code to get position:
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
String bestProvider = locationManager.getBestProvider(criteria, false);
Location location = locationManager.getLastKnownLocation(bestProvider);
Double lat = location.getLatitude ();
Double lon = location.getLongitude ();
I have so many questions:
If GPS is turned off, is it uses network location? If no, how to implement that?
If GPS is enabled, is it always uses it ignoring network location? If no, how to implement that?
Is it uses, if available, the most precise method to get latitude and longitude? If no, how to implement that?
Thanks in advance for clarifications.