|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.TimerTask
com.nutiteq.location.providers.CellIdLocationProvider
public class CellIdLocationProvider
Generic cell id location positioning handler. Supports single location query
or polling at given interval. Pushes retrieved location in WGS84 to
LocationListener. If location could not be
determined, then null will be pushed into marker and status
changes to LocationSource.STATUS_CANT_LOCATE.
| Field Summary |
|---|
| Fields inherited from interface com.nutiteq.location.LocationSource |
|---|
STATUS_CANT_LOCATE, STATUS_CONNECTED, STATUS_CONNECTING, STATUS_CONNECTION_LOST |
| Constructor Summary | |
|---|---|
CellIdLocationProvider(CellIdDataReader cellIdDataReader,
CellIdService cellIdService)
Create location provider for single query |
|
CellIdLocationProvider(CellIdDataReader dataReader,
CellIdService cellIdService,
long updateInterval)
Create location provider that queries for location at given interval |
|
| Method Summary | |
|---|---|
void |
addLocationListener(LocationListener listener)
Add listener for location coordinates |
void |
cantLocate()
|
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 |
locationRetrieved(WgsPoint wgsPoint)
|
void |
notifyError()
|
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.util.TimerTask |
|---|
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CellIdLocationProvider(CellIdDataReader cellIdDataReader,
CellIdService cellIdService)
cellIdDataReader - data reader used for cellid data accessingcellIdService - service to convert cellid to lat/long
public CellIdLocationProvider(CellIdDataReader dataReader,
CellIdService cellIdService,
long updateInterval)
dataReader - data reader used for cellid data accessupdateInterval - update interval for location query| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.util.TimerTaskpublic void start()
LocationSource
start in interface LocationSourcepublic int getStatus()
LocationSource
getStatus in interface LocationSourcepublic void notifyError()
notifyError in interface CellIdResponseWaiterpublic 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 cantLocate()
cantLocate in interface CellIdResponseWaiterpublic void locationRetrieved(WgsPoint wgsPoint)
locationRetrieved in interface CellIdResponseWaiterpublic WgsPoint getLocation()
getLocation in interface LocationSourcepublic void addLocationListener(LocationListener listener)
LocationSource
addLocationListener in interface LocationSourcelistener - listener to be addedpublic 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 | ||||||||