Mega Code Archive

 
Categories / Android / Hardware
 

LocationManager GPS_PROVIDER

import android.content.Context; import android.location.LocationManager; class GpsUtil {   public static boolean checkStatus(Context context){     LocationManager locationManager = (LocationManager)       context.getSystemService(Context.LOCATION_SERVICE);     return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);   } }