LocationSettingsStates

public final class LocationSettingsStates extends Object
implements Parcelable

Stores the current states of all location-related settings.

Inherited Constant Summary

Field Summary

public static final Creator<LocationSettingsStates> CREATOR

Public Method Summary

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)

Inherited Method Summary

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 Activity.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.

public void writeToParcel (Parcel dest, int flags)