LocationSettingsStates | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Fields | Methods | Inherited Methods | [Expand All]
public class

# LocationSettingsStates

extends Object
implements Parcelable

java.lang.Object
↳ | com.google.android.gms.location.LocationSettingsStates

## Class Overview

Stores the current states of all location-related settings.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Fields
public static final Creator<LocationSettingsStates> | CREATOR |

Public Methods
static LocationSettingsStates | fromIntent(Intent intent) Retrieves the location settings states from the intent extras.
boolean | isBlePresent() Whether BLE is present on the device.
boolean | isBleUsable() Whether BLE is enabled and is usable by the app.
boolean | isGpsPresent() Whether GPS provider is present on the device.
boolean | isGpsUsable() Whether GPS provider is enabled and is usable by the app.
boolean | isLocationPresent() Whether location is present on the device.
boolean | isLocationUsable() Whether location is enabled and is usable by the app.
boolean | isNetworkLocationPresent() Whether network location provider is present on the device.
boolean | isNetworkLocationUsable() Whether network location provider is enabled and usable by the app.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final Creator<LocationSettingsStates> CREATOR

## Public Methods

#### public static LocationSettingsStates fromIntent (Intent intent)

Retrieves the location settings states from the intent extras. When the location settings dialog finishes, you can use this method to retrieve the current location settings states from the intent in your `onActivityResult(int, int, Intent)`;

#### public boolean isBlePresent ()

Whether BLE is present on the device.

#### public boolean isBleUsable ()

Whether BLE is enabled and is usable by the app.

#### public boolean isGpsPresent ()

Whether GPS provider is present on the device.

#### public boolean isGpsUsable ()

Whether GPS provider is enabled and is usable by the app.

#### public boolean isLocationPresent ()

Whether location is present on the device. This method returns true when either GPS or network location provider is present.

#### public boolean isLocationUsable ()

Whether location is enabled and is usable by the app. This method returns true when either GPS or network location provider is usable.

#### public boolean isNetworkLocationPresent ()

Whether network location provider is present on the device.

#### public boolean isNetworkLocationUsable ()

Whether network location provider is enabled and usable by the app.