Android Context Check isGpsEnabled(Context context)

Here you can find the source of isGpsEnabled(Context context)

Description

is Gps Enabled

Declaration

public static boolean isGpsEnabled(Context context) 

Method Source Code

//package com.java2s;

import android.content.Context;

import android.location.LocationManager;

public class Main {

    public static boolean isGpsEnabled(Context context) {
        LocationManager lm = (LocationManager) context
                .getSystemService(Context.LOCATION_SERVICE);
        return lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
    }//from ww w. java2 s  . c  om
}

Related

  1. isExisting(Context context, Uri uri, String selection, String[] args)
  2. isFileExist(Context ctx, String filename)
  3. isFree(Context context)
  4. isGPRSAvailable(Context context)
  5. isGoogleAccountPresent(Context ctx)
  6. isHeadsetPluggedIn(Context context)
  7. isInstalledThroughPlayStore(final Context context)
  8. isLandscape(Context context)
  9. isLandscape(final Context context)