Builder
class Builder
kotlin.Any | |
↳ | android.location.provider.ProviderProperties.Builder |
Builder for ProviderProperties.
Summary
Public constructors | |
---|---|
Builder() |
|
Builder(providerProperties: ProviderProperties) |
Public methods | |
---|---|
ProviderProperties |
build() Builds a new ProviderProperties. |
ProviderProperties.Builder |
setAccuracy(accuracy: Int) Sets a very rough bucket of provider location accuracy. |
ProviderProperties.Builder |
setHasAltitudeSupport(supportsAltitude: Boolean) Sets whether a provider can provide altitude information. |
ProviderProperties.Builder |
setHasBearingSupport(supportsBearing: Boolean) Sets whether a provider can provide bearing information. |
ProviderProperties.Builder |
setHasCellRequirement(requiresCell: Boolean) Sets whether a provider requires cell tower access. |
ProviderProperties.Builder |
setHasMonetaryCost(monetaryCost: Boolean) Sets whether a provider has a monetary cost. |
ProviderProperties.Builder |
setHasNetworkRequirement(requiresNetwork: Boolean) Sets whether a provider requires network access. |
ProviderProperties.Builder |
setHasSatelliteRequirement(requiresSatellite: Boolean) Sets whether a provider requires satellite access. |
ProviderProperties.Builder |
setHasSpeedSupport(supportsSpeed: Boolean) Sets whether a provider can provide speed information. |
ProviderProperties.Builder |
setPowerUsage(powerUsage: Int) Sets a very rough bucket of provider power usage. |
Public constructors
Builder
Builder(providerProperties: ProviderProperties)
Parameters | |
---|---|
providerProperties |
ProviderProperties: This value cannot be null . |
Public methods
build
fun build(): ProviderProperties
Builds a new ProviderProperties.
Return | |
---|---|
ProviderProperties |
This value cannot be null . |
setAccuracy
fun setAccuracy(accuracy: Int): ProviderProperties.Builder
Sets a very rough bucket of provider location accuracy. ACCURACY_COARSE
by default.
Parameters | |
---|---|
accuracy |
Int: Value is android.location.provider.ProviderProperties#ACCURACY_FINE , or android.location.provider.ProviderProperties#ACCURACY_COARSE |
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasAltitudeSupport
fun setHasAltitudeSupport(supportsAltitude: Boolean): ProviderProperties.Builder
Sets whether a provider can provide altitude information. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasBearingSupport
fun setHasBearingSupport(supportsBearing: Boolean): ProviderProperties.Builder
Sets whether a provider can provide bearing information. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasCellRequirement
fun setHasCellRequirement(requiresCell: Boolean): ProviderProperties.Builder
Sets whether a provider requires cell tower access. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasMonetaryCost
fun setHasMonetaryCost(monetaryCost: Boolean): ProviderProperties.Builder
Sets whether a provider has a monetary cost. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasNetworkRequirement
fun setHasNetworkRequirement(requiresNetwork: Boolean): ProviderProperties.Builder
Sets whether a provider requires network access. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasSatelliteRequirement
fun setHasSatelliteRequirement(requiresSatellite: Boolean): ProviderProperties.Builder
Sets whether a provider requires satellite access. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasSpeedSupport
fun setHasSpeedSupport(supportsSpeed: Boolean): ProviderProperties.Builder
Sets whether a provider can provide speed information. False by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setPowerUsage
fun setPowerUsage(powerUsage: Int): ProviderProperties.Builder
Sets a very rough bucket of provider power usage. POWER_USAGE_HIGH
by default.
Return | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |