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 | |
| 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 | hashCode() | 
| String | toString() | 
| Unit | writeToParcel(parcel: Parcel, flags: Int)Flatten this object in to a Parcel. | 
| Properties | |
|---|---|
| static Parcelable.Creator<ProviderProperties!> | |
Constants
ACCURACY_COARSE
static val ACCURACY_COARSE: Int
A constant indicating a coarser location accuracy.
Value: 2ACCURACY_FINE
static val ACCURACY_FINE: Int
A constant indicating a finer location accuracy.
Value: 1POWER_USAGE_HIGH
static val POWER_USAGE_HIGH: Int
A constant indicating high power usage.
Value: 3POWER_USAGE_LOW
static val POWER_USAGE_LOW: Int
A constant indicating low power usage.
Value: 1POWER_USAGE_MEDIUM
static val POWER_USAGE_MEDIUM: Int
A constant indicating a medium power usage.
Value: 2Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
equals
fun equals(other: Any?): Boolean
| Parameters | |
|---|---|
| obj | the reference object with which to compare. | 
| Return | |
|---|---|
| Boolean | trueif this object is the same as the obj argument;falseotherwise. | 
getAccuracy
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, orandroid.location.provider.ProviderProperties#ACCURACY_COARSE | 
getPowerUsage
fun getPowerUsage(): Int
Power usage for this provider.
hasAltitudeSupport
fun hasAltitudeSupport(): Boolean
True if the provider is able to provide altitude under at least some conditions.
hasBearingSupport
fun hasBearingSupport(): Boolean
True if the provider is able to provide bearing under at least some conditions.
hasCellRequirement
fun hasCellRequirement(): Boolean
True if the provider requires access to a cellular network (e.g., for cell tower IDs).
hasMonetaryCost
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
fun hasNetworkRequirement(): Boolean
True if provider requires access to a data network (e.g., the Internet).
hasSatelliteRequirement
fun hasSatelliteRequirement(): Boolean
True if the provider requires access to a satellite-based positioning system (e.g., GPS).
hasSpeedSupport
fun hasSpeedSupport(): Boolean
True if the provider is able to provide speed under at least some conditions.
toString
fun toString(): String
| Return | |
|---|---|
| String | a string representation of the object. | 
writeToParcel
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 either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
| parcel | Parcel: This value cannot be null. | 
