public final class IALocationRequest extends Object implements Parcelable
IALocationManager
. Currently an empty
instance obtained with create()
can be used.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<IALocationRequest> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | Method and Description |
---|---|
static IALocationRequest |
create() |
int |
describeContents() |
long |
getFastestInterval()
Get fastest interval of this request, in milliseconds.
|
<T extends Parcelable> |
getParcelableExtra(String key) |
float |
getSmallestDisplacement()
Get smallest displacement for location updates to trigger, in meters.
|
String |
getStringExtra(String key) |
IALocationRequest |
putExtra(String key,
Parcelable value) |
IALocationRequest |
putExtra(String key,
String value) |
IALocationRequest |
setFastestInterval(long millis)
Explicitly set the fastest interval for location updates, in milliseconds.
|
IALocationRequest |
setSmallestDisplacement(float meters)
Set the minimum displacement between location updates in meters.
|
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<IALocationRequest> CREATOR
public static IALocationRequest create()
public IALocationRequest putExtra(String key, String value)
public IALocationRequest putExtra(String key, Parcelable value)
public IALocationRequest setFastestInterval(long millis)
This controls the fastest rate at which your application will receive location updates. The actual rate can be slower than requested but no faster than requested.
Requesting updates faster has only minimal impact on battery consumption and will not cause extra network load.
There is now lower limit on the frequency but using a very small value may effect your application performance.
If no value is set, the default value is 5Hz, i.e. 200ms
public long getFastestInterval()
getFastestInterval()
. Actual frequency
may be slower.-1
if value was not setpublic IALocationRequest setSmallestDisplacement(float meters)
This controls how often your application will receive location updates. User needs to move
specified distance for the IALocationListener.onLocationChanged(IALocation)
to
trigger. First update will always be delivered as soon as one is available.
Requesting updates faster has only minimal impact on battery consumption and will not cause extra network load.
public float getSmallestDisplacement()
-1
if not set.public <T extends Parcelable> T getParcelableExtra(String key)
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable