|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netmera.mobile.NetmeraLocationSettings
public class NetmeraLocationSettings
Used to control Netmera Location Settings.
Field Summary | |
---|---|
static int |
PRIORITY_BALANCED_POWER_ACCURACY
|
static int |
PRIORITY_HIGH_ACCURACY
|
static int |
PRIORITY_LOW_POWER
|
static int |
PRIORITY_NO_POWER
|
Constructor Summary | |
---|---|
NetmeraLocationSettings()
Default constructor |
Method Summary | |
---|---|
long |
getFastestInterval()
|
long |
getIntervalMeters()
|
long |
getIntervalSeconds()
|
int |
getPriority()
Get the quality of the request. |
NetmeraLocationSettings |
setFastestInterval(long fastestInterval)
Explicitly set the fastest interval for location updates, in milliseconds. |
NetmeraLocationSettings |
setIntervalMeters(long intervalMeters)
Set interval meters |
NetmeraLocationSettings |
setIntervalSeconds(long intervalSeconds)
Set interval seconds |
NetmeraLocationSettings |
setPriority(int priority)
Set the priority of the request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PRIORITY_HIGH_ACCURACY
public static final int PRIORITY_BALANCED_POWER_ACCURACY
public static final int PRIORITY_LOW_POWER
public static final int PRIORITY_NO_POWER
Constructor Detail |
---|
public NetmeraLocationSettings()
Method Detail |
---|
public int getPriority()
public NetmeraLocationSettings setPriority(int priority)
Use with a priority constant such as
PRIORITY_HIGH_ACCURACY
. No other values are
accepted.
The priority of the request is a strong hint to the LocationClient for
which location sources to use. For example,
PRIORITY_HIGH_ACCURACY
is more likely to use GPS,
and PRIORITY_BALANCED_POWER_ACCURACY
is more
likely to use WIFI & Cell tower positioning, but it also depends on many
other factors (such as which sources are available) and is implementation
dependent.
priority
- an accuracy or power constantpublic long getIntervalSeconds()
public NetmeraLocationSettings setIntervalSeconds(long intervalSeconds)
intervalSeconds
- in secondpublic long getIntervalMeters()
public NetmeraLocationSettings setIntervalMeters(long intervalMeters)
intervalMeters
- in meterspublic long getFastestInterval()
public NetmeraLocationSettings setFastestInterval(long fastestInterval)
This controls the fastest rate at which your application will receive
location updates, which might be faster than
setIntervalSeconds(long)
in some situations (for
example, if other applications are triggering location updates).
This allows your application to passively acquire locations at a rate faster than it actively acquires locations, saving power.
Unlike setIntervalSeconds(long)
, this parameter
is exact. Your application will never receive updates faster than this
value.
If you don't call this method, a fastest interval will be selected for
you. It will be a value faster than your active interval (
setIntervalSeconds(long)
).
An interval of 0 is allowed, but not recommended, since location updates may be extremely fast on future implementations.
If setFastestInterval(long)
is set slower than
setIntervalSeconds(long)
, then your effective
fastest interval is setIntervalSeconds(long)
.
fastestInterval
- fastest interval for updates in milliseconds, exact
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |