ProviderProperties.Builder
public
static
final
class
ProviderProperties.Builder
extends Object
java.lang.Object | |
↳ | 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(int accuracy)
Sets a very rough bucket of provider location accuracy. |
ProviderProperties.Builder
|
setHasAltitudeSupport(boolean supportsAltitude)
Sets whether a provider can provide altitude information. |
ProviderProperties.Builder
|
setHasBearingSupport(boolean supportsBearing)
Sets whether a provider can provide bearing information. |
ProviderProperties.Builder
|
setHasCellRequirement(boolean requiresCell)
Sets whether a provider requires cell tower access. |
ProviderProperties.Builder
|
setHasMonetaryCost(boolean monetaryCost)
Sets whether a provider has a monetary cost. |
ProviderProperties.Builder
|
setHasNetworkRequirement(boolean requiresNetwork)
Sets whether a provider requires network access. |
ProviderProperties.Builder
|
setHasSatelliteRequirement(boolean requiresSatellite)
Sets whether a provider requires satellite access. |
ProviderProperties.Builder
|
setHasSpeedSupport(boolean supportsSpeed)
Sets whether a provider can provide speed information. |
ProviderProperties.Builder
|
setPowerUsage(int powerUsage)
Sets a very rough bucket of provider power usage. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (ProviderProperties providerProperties)
Parameters | |
---|---|
providerProperties |
ProviderProperties : This value cannot be null . |
Public methods
build
public ProviderProperties build ()
Builds a new ProviderProperties.
Returns | |
---|---|
ProviderProperties |
This value cannot be null . |
setAccuracy
public ProviderProperties.Builder setAccuracy (int accuracy)
Sets a very rough bucket of provider location accuracy. ProviderProperties.ACCURACY_COARSE
by
default.
Parameters | |
---|---|
accuracy |
int : Value is ProviderProperties.ACCURACY_FINE , or ProviderProperties.ACCURACY_COARSE |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasAltitudeSupport
public ProviderProperties.Builder setHasAltitudeSupport (boolean supportsAltitude)
Sets whether a provider can provide altitude information. False by default.
Parameters | |
---|---|
supportsAltitude |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasBearingSupport
public ProviderProperties.Builder setHasBearingSupport (boolean supportsBearing)
Sets whether a provider can provide bearing information. False by default.
Parameters | |
---|---|
supportsBearing |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasCellRequirement
public ProviderProperties.Builder setHasCellRequirement (boolean requiresCell)
Sets whether a provider requires cell tower access. False by default.
Parameters | |
---|---|
requiresCell |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasMonetaryCost
public ProviderProperties.Builder setHasMonetaryCost (boolean monetaryCost)
Sets whether a provider has a monetary cost. False by default.
Parameters | |
---|---|
monetaryCost |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasNetworkRequirement
public ProviderProperties.Builder setHasNetworkRequirement (boolean requiresNetwork)
Sets whether a provider requires network access. False by default.
Parameters | |
---|---|
requiresNetwork |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasSatelliteRequirement
public ProviderProperties.Builder setHasSatelliteRequirement (boolean requiresSatellite)
Sets whether a provider requires satellite access. False by default.
Parameters | |
---|---|
requiresSatellite |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setHasSpeedSupport
public ProviderProperties.Builder setHasSpeedSupport (boolean supportsSpeed)
Sets whether a provider can provide speed information. False by default.
Parameters | |
---|---|
supportsSpeed |
boolean |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |
setPowerUsage
public ProviderProperties.Builder setPowerUsage (int powerUsage)
Sets a very rough bucket of provider power usage. ProviderProperties.POWER_USAGE_HIGH
by default.
Parameters | |
---|---|
powerUsage |
int : Value is ProviderProperties.POWER_USAGE_LOW , ProviderProperties.POWER_USAGE_MEDIUM , or ProviderProperties.POWER_USAGE_HIGH |
Returns | |
---|---|
ProviderProperties.Builder |
This value cannot be null . |