I am writing a method that will return true if a GPS sensor is present and turned on, but returns false if it is missing or turned off. This is hard to prove because ...
hasSystemFeature("FEATURE_LOCATION_GPS") // on PackageManager
Returns false whether the device has a GPS or not. Thus, even on a device that has one, and it turns on, it still returns false. It seems completely wrong to me, but I donโt understand why.
isProviderEnabled("gps") // on LocationManager
It returns true, even on the device that I have, where there is no GPS equipment at all. It also seems completely contradictory.
I accept that these results may be due to the fact that I missed something, the SDK is not intuitive, or maybe even the devices with which I am testing behave strangely.
What am I missing?