is Location Services Supported - Android Phone

Android examples for Phone:Phone Information

Description

is Location Services Supported

Demo Code


//package com.java2s;

import android.content.Context;

import android.location.LocationManager;

public class Main {
    public static boolean isLocationServicesSupported(Context c) {
        LocationManager lm = (LocationManager) c
                .getSystemService(Context.LOCATION_SERVICE);
        return lm != null;
    }//w w  w.j  a v  a 2  s.  co  m
}

Related Tutorials