Added in API level 31

ProviderProperties

class ProviderProperties : Parcelable
kotlin.Any
   ↳ android.location.provider.ProviderProperties

Location provider properties.

Summary

Nested classes

Builder for ProviderProperties.

Constants
static Int

A constant indicating a coarser location accuracy.

static Int

A constant indicating a finer location accuracy.

static Int

A constant indicating high power usage.

static Int

A constant indicating low power usage.

static Int

A constant indicating a medium power usage.

Inherited constants
Public methods
Int

Boolean
equals(other: Any?)

Int

Rough location accuracy for this provider, primarily with respect to horizontal location accuracy.

Int

Power usage for this provider.

Boolean

True if the provider is able to provide altitude under at least some conditions.

Boolean

True if the provider is able to provide bearing under at least some conditions.

Boolean

True if the provider requires access to a cellular network (e.g., for cell tower IDs).

Boolean

True if this provider may result in a monetary charge to the user.

Boolean

True if provider requires access to a data network (e.g., the Internet).

Boolean

True if the provider requires access to a satellite-based positioning system (e.g., GPS).

Boolean

True if the provider is able to provide speed under at least some conditions.

Int

String

Unit
writeToParcel(parcel: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<ProviderProperties!>

Constants

ACCURACY_COARSE

Added in API level 31
static val ACCURACY_COARSE: Int

A constant indicating a coarser location accuracy.

Value: 2

ACCURACY_FINE

Added in API level 31
static val ACCURACY_FINE: Int

A constant indicating a finer location accuracy.

Value: 1

POWER_USAGE_HIGH

Added in API level 31
static val POWER_USAGE_HIGH: Int

A constant indicating high power usage.

Value: 3

POWER_USAGE_LOW

Added in API level 31
static val POWER_USAGE_LOW: Int

A constant indicating low power usage.

Value: 1

POWER_USAGE_MEDIUM

Added in API level 31
static val POWER_USAGE_MEDIUM: Int

A constant indicating a medium power usage.

Value: 2

Public methods

describeContents

Added in API level 31
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

equals

Added in API level 31
fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getAccuracy

Added in API level 31
fun getAccuracy(): Int

Rough location accuracy for this provider, primarily with respect to horizontal location accuracy.

Return
Int Value is android.location.provider.ProviderProperties#ACCURACY_FINE, or android.location.provider.ProviderProperties#ACCURACY_COARSE

hasAltitudeSupport

Added in API level 31
fun hasAltitudeSupport(): Boolean

True if the provider is able to provide altitude under at least some conditions.

hasBearingSupport

Added in API level 31
fun hasBearingSupport(): Boolean

True if the provider is able to provide bearing under at least some conditions.

hasCellRequirement

Added in API level 31
fun hasCellRequirement(): Boolean

True if the provider requires access to a cellular network (e.g., for cell tower IDs).

hasMonetaryCost

Added in API level 31
fun hasMonetaryCost(): Boolean

True if this provider may result in a monetary charge to the user. Network usage is not considered a monetary cost.

hasNetworkRequirement

Added in API level 31
fun hasNetworkRequirement(): Boolean

True if provider requires access to a data network (e.g., the Internet).

hasSatelliteRequirement

Added in API level 31
fun hasSatelliteRequirement(): Boolean

True if the provider requires access to a satellite-based positioning system (e.g., GPS).

hasSpeedSupport

Added in API level 31
fun hasSpeedSupport(): Boolean

True if the provider is able to provide speed under at least some conditions.

hashCode

Added in API level 31
fun hashCode(): Int
Return
Int a hash code value for this object.

toString

Added in API level 31
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 31
fun writeToParcel(
    parcel: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES
parcel Parcel: This value cannot be null.

Properties

CREATOR

Added in API level 31
static val CREATOR: Parcelable.Creator<ProviderProperties!>