com.netmera.mobile
Class NetmeraLocationSettings

java.lang.Object
  extended by com.netmera.mobile.NetmeraLocationSettings

public class NetmeraLocationSettings
extends java.lang.Object

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

PRIORITY_HIGH_ACCURACY

public static final int PRIORITY_HIGH_ACCURACY
See Also:
Constant Field Values

PRIORITY_BALANCED_POWER_ACCURACY

public static final int PRIORITY_BALANCED_POWER_ACCURACY
See Also:
Constant Field Values

PRIORITY_LOW_POWER

public static final int PRIORITY_LOW_POWER
See Also:
Constant Field Values

PRIORITY_NO_POWER

public static final int PRIORITY_NO_POWER
See Also:
Constant Field Values
Constructor Detail

NetmeraLocationSettings

public NetmeraLocationSettings()
Default constructor

Method Detail

getPriority

public int getPriority()
Get the quality of the request.

Returns:
an accuracy constant

setPriority

public NetmeraLocationSettings setPriority(int priority)
Set the priority of the request.

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.

Parameters:
priority - an accuracy or power constant

getIntervalSeconds

public long getIntervalSeconds()
Returns:
interval seconds for location updates

setIntervalSeconds

public NetmeraLocationSettings setIntervalSeconds(long intervalSeconds)
Set interval seconds

Parameters:
intervalSeconds - in second

getIntervalMeters

public long getIntervalMeters()
Returns:
interval meters for location updates

setIntervalMeters

public NetmeraLocationSettings setIntervalMeters(long intervalMeters)
Set interval meters

Parameters:
intervalMeters - in meters

getFastestInterval

public long getFastestInterval()

setFastestInterval

public NetmeraLocationSettings setFastestInterval(long fastestInterval)
Explicitly set the fastest interval for location updates, in milliseconds.

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).

Parameters:
fastestInterval - fastest interval for updates in milliseconds, exact