|
|||||||||
| 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 without an accuracy requirement. |
|
| Method Summary | |
|---|---|
void |
addLocationListener(LocationListener listener)
Add listener for location coordinates |
WgsPoint |
getLocation()
|
LocationMarker |
getLocationMarker()
Get location marker used on screen |
int |
getStatus()
Get status code for location source. |
void |
locationUpdated(javax.microedition.location.LocationProvider provider,
javax.microedition.location.Location location)
|
void |
providerStateChanged(javax.microedition.location.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 without an 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)| 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(javax.microedition.location.LocationProvider provider,
javax.microedition.location.Location location)
locationUpdated in interface javax.microedition.location.LocationListener
public void providerStateChanged(javax.microedition.location.LocationProvider provider,
int newState)
providerStateChanged in interface javax.microedition.location.LocationListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||