java.lang.Object | |
↳ | android.location.Criteria |
A class indicating the application criteria for selecting a location provider. Providers maybe ordered according to accuracy, power usage, ability to report altitude, speed, and bearing, and monetary cost.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ACCURACY_COARSE | A constant indicating an approximate accuracy requirement | |||||||||
int | ACCURACY_FINE | A constant indicating a finer location accuracy requirement | |||||||||
int | ACCURACY_HIGH | a constant indicating a high accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. | |||||||||
int | ACCURACY_LOW | A constant indicating a low location accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. | |||||||||
int | ACCURACY_MEDIUM | A constant indicating a medium accuracy requirement - currently used only for horizontal accuracy. | |||||||||
int | NO_REQUIREMENT | A constant indicating that the application does not choose to place requirement on a particular feature. | |||||||||
int | POWER_HIGH | A constant indicating a high power requirement. | |||||||||
int | POWER_LOW | A constant indicating a low power requirement. | |||||||||
int | POWER_MEDIUM | A constant indicating a medium power requirement. |
[Expand]
Inherited Constants
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructs a new Criteria object.
|
||||||||||
|
Constructs a new Criteria object that is a copy of the given criteria.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
||||||||||
|
Returns a constant indicating desired accuracy of location
Accuracy may be
ACCURACY_FINE
if desired location
is fine, else it can be
ACCURACY_COARSE
.
|
||||||||||
|
Returns a constant indicating the desired bearing accuracy.
|
||||||||||
|
Returns a constant indicating the desired horizontal accuracy (latitude and longitude).
|
||||||||||
|
Returns a constant indicating the desired power requirement.
|
||||||||||
|
Returns a constant indicating the desired speed accuracy
Accuracy may be
ACCURACY_LOW
,
ACCURACY_HIGH
,
or
NO_REQUIREMENT
.
|
||||||||||
|
Returns a constant indicating the desired vertical accuracy (altitude).
|
||||||||||
|
Returns whether the provider must provide altitude information.
|
||||||||||
|
Returns whether the provider must provide bearing information.
|
||||||||||
|
Returns whether the provider is allowed to incur monetary cost.
|
||||||||||
|
Returns whether the provider must provide speed information.
|
||||||||||
|
Indicates the desired accuracy for latitude and longitude.
|
||||||||||
|
Indicates whether the provider must provide altitude information.
|
||||||||||
|
Indicates the desired bearing accuracy.
|
||||||||||
|
Indicates whether the provider must provide bearing information.
|
||||||||||
|
Indicates whether the provider is allowed to incur monetary cost.
|
||||||||||
|
Indicates the desired horizontal accuracy (latitude and longitude).
|
||||||||||
|
Indicates the desired maximum power level.
|
||||||||||
|
Indicates the desired speed accuracy.
|
||||||||||
|
Indicates whether the provider must provide speed information.
|
||||||||||
|
Indicates the desired vertical accuracy (altitude).
|
||||||||||
|
Returns a string containing a concise, human-readable description of this
object.
|
||||||||||
|
Flatten this object in to a Parcel.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
|||||||||||
From interface
android.os.Parcelable
|
A constant indicating an approximate accuracy requirement
A constant indicating a finer location accuracy requirement
a constant indicating a high accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of less than 100 meters.
A constant indicating a low location accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of greater than 500 meters.
A constant indicating a medium accuracy requirement - currently used only for horizontal accuracy. For horizontal position this corresponds roughly to to an accuracy of between 100 and 500 meters.
A constant indicating that the application does not choose to place requirement on a particular feature.
A constant indicating a high power requirement.
A constant indicating a low power requirement.
A constant indicating a medium power requirement.
Constructs a new Criteria object. The new object will have no requirements on accuracy, power, or response time; will not require altitude, speed, or bearing; and will not allow monetary cost.
Constructs a new Criteria object that is a copy of the given criteria.
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Returns a constant indicating desired accuracy of location
Accuracy may be
ACCURACY_FINE
if desired location
is fine, else it can be
ACCURACY_COARSE
.
Returns a constant indicating the desired bearing accuracy.
Accuracy may be
ACCURACY_LOW
,
ACCURACY_HIGH
,
or
NO_REQUIREMENT
.
Returns a constant indicating the desired horizontal accuracy (latitude and longitude).
Accuracy may be
ACCURACY_LOW
,
ACCURACY_MEDIUM
,
ACCURACY_HIGH
or
NO_REQUIREMENT
.
Returns a constant indicating the desired power requirement. The returned
Returns a constant indicating the desired speed accuracy
Accuracy may be
ACCURACY_LOW
,
ACCURACY_HIGH
,
or
NO_REQUIREMENT
.
Returns a constant indicating the desired vertical accuracy (altitude).
Accuracy may be
ACCURACY_LOW
,
ACCURACY_HIGH
,
or
NO_REQUIREMENT
.
Returns whether the provider must provide altitude information. Not all fixes are guaranteed to contain such information.
Returns whether the provider must provide bearing information. Not all fixes are guaranteed to contain such information.
Returns whether the provider is allowed to incur monetary cost.
Returns whether the provider must provide speed information. Not all fixes are guaranteed to contain such information.
Indicates the desired accuracy for latitude and longitude. Accuracy
may be
ACCURACY_FINE
if desired location
is fine, else it can be
ACCURACY_COARSE
.
More accurate location may consume more power and may take longer.
IllegalArgumentException | if accuracy is not one of the supported constants |
---|
Indicates whether the provider must provide altitude information. Not all fixes are guaranteed to contain such information.
Indicates the desired bearing accuracy.
Accuracy may be
ACCURACY_LOW
,
ACCURACY_HIGH
,
or
NO_REQUIREMENT
.
More accurate location may consume more power and may take longer.
IllegalArgumentException | if accuracy is not one of the supported constants |
---|
Indicates whether the provider must provide bearing information. Not all fixes are guaranteed to contain such information.
Indicates whether the provider is allowed to incur monetary cost.
Indicates the desired horizontal accuracy (latitude and longitude).
Accuracy may be
ACCURACY_LOW
,
ACCURACY_MEDIUM
,
ACCURACY_HIGH
or
NO_REQUIREMENT
.
More accurate location may consume more power and may take longer.
IllegalArgumentException | if accuracy is not one of the supported constants |
---|
Indicates the desired maximum power level. The level parameter must be one of NO_REQUIREMENT, POWER_LOW, POWER_MEDIUM, or POWER_HIGH.
Indicates the desired speed accuracy.
Accuracy may be
ACCURACY_LOW
,
ACCURACY_HIGH
,
or
NO_REQUIREMENT
.
More accurate location may consume more power and may take longer.
IllegalArgumentException | if accuracy is not one of the supported constants |
---|
Indicates whether the provider must provide speed information. Not all fixes are guaranteed to contain such information.
Indicates the desired vertical accuracy (altitude).
Accuracy may be
ACCURACY_LOW
,
ACCURACY_MEDIUM
,
ACCURACY_HIGH
or
NO_REQUIREMENT
.
More accurate location may consume more power and may take longer.
IllegalArgumentException | if accuracy is not one of the supported constants |
---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See
Writing a useful
toString
method
if you intend implementing your own
toString
method.
Flatten this object in to a Parcel.
parcel | The Parcel in which the object should be written. |
---|---|
flags |
Additional flags about how the object should be written.
May be 0 or
PARCELABLE_WRITE_RETURN_VALUE
.
|