LocationSettingsStates

public final classLocationSettingsStatesextendsObject
implementsParcelable

Stores the current states of all location-related settings.

Inherited Constant Summary

Field Summary

public static finalCreator<LocationSettingsStates> CREATOR

Public Method Summary

staticLocationSettingsStates
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(Parceldest, int flags)

Inherited Method Summary

Fields

public static finalCreator<LocationSettingsStates> CREATOR

Public Methods

public staticLocationSettingsStates 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 booleanisBlePresent()

Whether BLE is present on the device.

public booleanisBleUsable()

Whether BLE is enabled and is usable by the app.

public booleanisGpsPresent()

Whether GPS provider is present on the device.

public booleanisGpsUsable()

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

public booleanisLocationPresent()

Whether location is present on the device.

This method returns true when either GPS or network location provider is present.

public booleanisLocationUsable()

Whether location is enabled and is usable by the app.

This method returns true when either GPS or network location provider is usable.

public booleanisNetworkLocationPresent()

Whether network location provider is present on the device.

public booleanisNetworkLocationUsable()

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

public voidwriteToParcel(Parceldest, int flags)