public class MockEngine extends LocationEngine
LocationEngine.Callback| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MOCK_PROVIDER |
protected com.mapzen.android.lost.internal.TraceThread |
traceThread |
| Constructor and Description |
|---|
MockEngine(android.content.Context context,
LocationEngine.Callback callback,
TraceThreadFactory traceThreadFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
disable()
Subclass should perform all operations required to disable the engine.
|
protected void |
enable()
Subclass should perform all operations required to enable the engine.
|
android.location.Location |
getLastLocation()
Return most best recent location available.
|
java.io.File |
getTrace()
Returns the current file used to replay mock locations.
|
boolean |
isProviderEnabled(java.lang.String provider) |
void |
setLocation(android.location.Location location) |
void |
setTrace(java.io.File file)
Set a GPX trace file to be replayed as mock locations.
|
addRequest, createLocationAvailability, getCallback, getContext, getLooper, getRequest, removeAllRequests, removeRequestspublic static final java.lang.String MOCK_PROVIDER
protected com.mapzen.android.lost.internal.TraceThread traceThread
public MockEngine(android.content.Context context,
LocationEngine.Callback callback,
TraceThreadFactory traceThreadFactory)
public android.location.Location getLastLocation()
LocationEnginegetLastLocation in class LocationEnginepublic boolean isProviderEnabled(java.lang.String provider)
isProviderEnabled in class LocationEngineprotected void enable()
LocationEngineenable in class LocationEngineprotected void disable()
LocationEnginedisable in class LocationEnginepublic void setLocation(android.location.Location location)
public void setTrace(java.io.File file)
public java.io.File getTrace()