Most of the time it out puts my actuall coordinates but sometimes it I get 0,0 can someone please explain why?
LocationManager locationManager = (LocationManager) context
.getSystemService(Context.LOCATION_SERVICE);
List<String> providers = locationManager.getProviders(true);
Location location = null;
for (int i = 0; i < providers.size(); i++) {
if ((location = locationManager.getLastKnownLocation(providers
.get(i))) != null) {
break;
}
}