public final 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
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.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

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);

Parameters
intent Intent
Returns
LocationSettingsStates

public boolean isBlePresent ()

Whether BLE is present on the device.

Returns
boolean

public boolean isBleUsable ()

Whether BLE is enabled and is usable by the app.

Returns
boolean

public boolean isGpsPresent ()

Whether GPS provider is present on the device.

Returns
boolean

public boolean isGpsUsable ()

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

Returns
boolean

public boolean isLocationPresent ()

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

Returns
boolean

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.

Returns
boolean

public boolean isNetworkLocationPresent ()

Whether network location provider is present on the device.

Returns
boolean

public boolean isNetworkLocationUsable ()

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

Returns
boolean

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int