|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.location.Criteria
public class 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface android.os.Parcelable |
|---|
Parcelable.Creator<T> |
| Field Summary | |
|---|---|
static int |
ACCURACY_COARSE
A constant indicating an approximate accuracy requirement |
static int |
ACCURACY_FINE
A constant indicating a finer location accuracy requirement |
static Parcelable.Creator<Criteria> |
CREATOR
|
static int |
NO_REQUIREMENT
A constant indicating that the application does not choose to place requirement on a particular feature. |
static int |
POWER_HIGH
A constant indicating a high power requirement. |
static int |
POWER_LOW
A constant indicating a low power requirement. |
static int |
POWER_MEDIUM
A constant indicating a medium power requirement. |
| Fields inherited from interface android.os.Parcelable |
|---|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE |
| Constructor Summary | |
|---|---|
Criteria()
Constructs a new Criteria object. |
|
Criteria(Criteria criteria)
Constructs a new Criteria object that is a copy of the given criteria. |
|
| Method Summary | |
|---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation. |
int |
getAccuracy()
Returns a constant indicating desired accuracy of location Accuracy may be ACCURACY_FINE if desired location
is fine, else it can be ACCURACY_COARSE. |
int |
getPowerRequirement()
Returns a constant indicating the desired power requirement. |
boolean |
isAltitudeRequired()
Returns whether the provider must provide altitude information. |
boolean |
isBearingRequired()
Returns whether the provider must provide bearing information. |
boolean |
isCostAllowed()
Returns whether the provider is allowed to incur monetary cost. |
boolean |
isSpeedRequired()
Returns whether the provider must provide speed information. |
void |
setAccuracy(int accuracy)
Indicates the desired accuracy for latitude and longitude. |
void |
setAltitudeRequired(boolean altitudeRequired)
Indicates whether the provider must provide altitude information. |
void |
setBearingRequired(boolean bearingRequired)
Indicates whether the provider must provide bearing information. |
void |
setCostAllowed(boolean costAllowed)
Indicates whether the provider is allowed to incur monetary cost. |
void |
setPowerRequirement(int level)
Indicates the desired maximum power level. |
void |
setSpeedRequired(boolean speedRequired)
Indicates whether the provider must provide speed information. |
void |
writeToParcel(Parcel parcel,
int flags)
Flatten this object in to a Parcel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_REQUIREMENT
public static final int POWER_LOW
public static final int POWER_MEDIUM
public static final int POWER_HIGH
public static final int ACCURACY_FINE
public static final int ACCURACY_COARSE
public static final Parcelable.Creator<Criteria> CREATOR
| Constructor Detail |
|---|
public Criteria()
public Criteria(Criteria criteria)
| Method Detail |
|---|
public void setAccuracy(int accuracy)
ACCURACY_FINE if desired location
is fine, else it can be ACCURACY_COARSE.
More accurate location usually consumes more power and may take
longer.
IllegalArgumentException - if accuracy is negativepublic int getAccuracy()
ACCURACY_FINE if desired location
is fine, else it can be ACCURACY_COARSE.
public void setPowerRequirement(int level)
public int getPowerRequirement()
public void setCostAllowed(boolean costAllowed)
public boolean isCostAllowed()
public void setAltitudeRequired(boolean altitudeRequired)
public boolean isAltitudeRequired()
public void setSpeedRequired(boolean speedRequired)
public boolean isSpeedRequired()
public void setBearingRequired(boolean bearingRequired)
public boolean isBearingRequired()
public int describeContents()
Parcelable
describeContents in interface Parcelable
public void writeToParcel(Parcel parcel,
int flags)
Parcelable
writeToParcel in interface Parcelableparcel - The Parcel in which the object should be written.flags - Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||