app/src/main/java/com/example/androidverifier/Verify.java
/**
     *
     * @param context
     * @return true if the location is available
     */
@param context
@return true if the location is available
@param context @return true if the location is available
public static Boolean isGPSEnabled(Context context){
        LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
        boolean value = false;
        try {
             if( locationManager !=null && locationManager.isLocationEnabled())
                 value = true;
        }catch (Exception e){
        value =false;
        }
        return value;
    }
public static Boolean isGPSEnabled ( Context context ) { LocationManager locationManager = ( LocationManager ) context . getSystemService ( Context . LOCATION_SERVICE ) ; boolean value = false ; try { if ( locationManager != null && locationManager . isLocationEnabled ( ) ) value = true ; } catch ( Exception e ) { value = false ; } return value ; }
@param context
 @return true if the location is available
@param context @return true if the location is available
//)