0

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;
    }

}                           
Ashish
  • 1,121
  • 2
  • 15
  • 25
Will Jamieson
  • 918
  • 1
  • 16
  • 32

0 Answers0