public final class LocationRequestUnbundled extends Object
IMPORTANT: This class is effectively a public API for unbundled applications, and must remain API stable. See README.txt in the root of this package for more information.
Modifier and Type | Field and Description |
---|---|
static int |
ACCURACY_BLOCK
Returned by
getQuality() when requesting "block" level accuracy. |
static int |
ACCURACY_CITY
Returned by
getQuality() when requesting "city" level accuracy. |
static int |
ACCURACY_FINE
Returned by
getQuality() when requesting the most accurate locations available. |
static int |
POWER_HIGH
Returned by
getQuality() when allowing high power consumption for location. |
static int |
POWER_LOW
Returned by
getQuality() when requesting low power impact. |
static int |
POWER_NONE
Returned by
getQuality() when requiring no direct power impact (passive locations). |
Modifier and Type | Method and Description |
---|---|
long |
getFastestInterval()
Get the fastest interval of this request, in milliseconds.
|
long |
getInterval()
Get the desired interval of this request, in milliseconds.
|
int |
getQuality()
Get the quality of the request.
|
float |
getSmallestDisplacement()
Get the minimum distance between location updates, in meters.
|
String |
toString()
Returns a string representation of the object.
|
public static final int ACCURACY_FINE
getQuality()
when requesting the most accurate locations available.
This may be up to 1 meter accuracy, although this is implementation dependent.
public static final int ACCURACY_BLOCK
getQuality()
when requesting "block" level accuracy.
Block level accuracy is considered to be about 100 meter accuracy, although this is implementation dependent. Using a coarse accuracy such as this often consumes less power.
public static final int ACCURACY_CITY
getQuality()
when requesting "city" level accuracy.
City level accuracy is considered to be about 10km accuracy, although this is implementation dependent. Using a coarse accuracy such as this often consumes less power.
public static final int POWER_NONE
getQuality()
when requiring no direct power impact (passive locations).
This location request will not trigger any active location requests, but will receive locations triggered by other applications. Your application will not receive any direct power blame for location work.
public static final int POWER_LOW
getQuality()
when requesting low power impact.
This location request will avoid high power location work where possible.
public static final int POWER_HIGH
getQuality()
when allowing high power consumption for location.
This location request will allow high power location work.
public long getInterval()
public long getFastestInterval()
The system will never provide location updates faster
than the minimum of getFastestInterval()
and
getInterval()
.
public int getQuality()
public float getSmallestDisplacement()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())