|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.location.providers.LocationAPIProvider
public class LocationAPIProvider
This is a wrapper class around JSR179
| Field Summary |
|---|
| Fields inherited from interface com.nutiteq.location.LocationSource |
|---|
STATUS_CANT_LOCATE, STATUS_CONNECTED, STATUS_CONNECTING, STATUS_CONNECTION_LOST |
| Constructor Summary | |
|---|---|
LocationAPIProvider(long updateInterval)
Create location provider with given update interval (in milliseconds) and without any accuracy requirements. |
|
LocationAPIProvider(long updateInterval,
int accuracy)
Create location provider with given update interval (in milliseconds) and with accuracy requirement. |
|
LocationAPIProvider(long updateInterval,
int accuracy,
int timeout,
int maxAge)
Create location provider with given update interval (in milliseconds) and with accuracy requirement. |
|
| Method Summary | |
|---|---|
void |
addLocationListener(LocationListener listener)
Add listener for location coordinates |
WgsPoint |
getLocation()
|
LocationMarker |
getLocationMarker()
Get location marker used on screen |
java.lang.String |
getMethod()
Method of positioning, depending on implementation e.g. |
java.lang.Object |
getNativeLocation()
Provides native location object with last info, e.g. |
int |
getStatus()
Get status code for location source. |
void |
locationUpdated(LocationProvider provider,
Location location)
|
void |
providerStateChanged(LocationProvider provider,
int newState)
|
void |
quit()
Quit location polling |
void |
run()
|
void |
setLocationMarker(LocationMarker marker)
Set location marker where to push location updates |
void |
start()
Start location polling |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocationAPIProvider(long updateInterval)
updateInterval - location update time in milliseconds
public LocationAPIProvider(long updateInterval,
int accuracy)
Create location provider with given update interval (in milliseconds) and with accuracy requirement.
On Nokia phones this could trigger assisted positioning for faster location finding.
updateInterval - location update time in millisecondsaccuracy - accuracy for positioning (suggested value would be starting from
500)
public LocationAPIProvider(long updateInterval,
int accuracy,
int timeout,
int maxAge)
Create location provider with given update interval (in milliseconds) and with accuracy requirement.
updateInterval - location update time in millisecondsaccuracy - accuracy for positioning (suggested value would be starting from
500)timeout - location retrieving timeout in secondsmaxAge - maximum location age in seconds| Method Detail |
|---|
public void start()
LocationSource
start in interface LocationSourcepublic void run()
run in interface java.lang.Runnablepublic WgsPoint getLocation()
getLocation in interface LocationSourcepublic int getStatus()
LocationSource
getStatus in interface LocationSourcepublic LocationMarker getLocationMarker()
LocationSource
getLocationMarker in interface LocationSourcepublic void quit()
LocationSource
quit in interface LocationSourcepublic void setLocationMarker(LocationMarker marker)
LocationSource
setLocationMarker in interface LocationSourcemarker - marker displayed on screenpublic void addLocationListener(LocationListener listener)
LocationSource
addLocationListener in interface LocationSourcelistener - listener to be added
public void locationUpdated(LocationProvider provider,
Location location)
public void providerStateChanged(LocationProvider provider,
int newState)
public java.lang.String getMethod()
LocationSource
getMethod in interface LocationSourcepublic java.lang.Object getNativeLocation()
LocationSource
getNativeLocation in interface LocationSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||