How to check for the presence of a GPS sensor?
I'm writing a method that will return true if there's a GPS sensor present and enabled, but returns false if it's absent or switched off. It's proving hard because... hasSystemFeature("FEATURE_LOCATION_GPS") // on PackageManager Returns false, whether the device has a GPS or not. So even on a device that has one, and it's switched on, it still returns false. Seems completely wrong to me, but I can't see why. isProviderEnabled("gps") // on LocationManager Returns true, even on a device I have here that has no GPS hardware at all. That also seems completely counter-intuitive. I accept these