Here you can find the source of isLocationEnabledGPS(Context c)
public static boolean isLocationEnabledGPS(Context c)
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.location.LocationManager; public class Main { public static boolean isLocationEnabledGPS(Context c) { LocationManager lm = (LocationManager) c .getSystemService(Context.LOCATION_SERVICE); return lm.isProviderEnabled(LocationManager.GPS_PROVIDER); }/* w w w . j ava 2 s . co m*/ }