Android Utililty Methods GPS State Check

List of utility methods to do GPS State Check

Description

The list of methods to do GPS State Check are organized into topic(s).

Method

booleanisGpsEnabled(Context c)
is Gps Enabled
LocationManager service = (LocationManager) c
        .getSystemService(Context.LOCATION_SERVICE);
return service.isProviderEnabled(LocationManager.GPS_PROVIDER);
booleanisSameGPSLocation(double lon, double lat, double lon1, double lat1)
Same as query for a location in DatabaseHelper.findClosestAirportID()
if (((lon - lon1) * (lon - lon1) + (lat - lat1) * (lat - lat1)) < 0.001) {
    return true;
return false;