public class FusionEngine extends LocationEngine implements android.location.LocationListener
LocationEngine.Callback| Modifier and Type | Field and Description |
|---|---|
static long |
RECENT_UPDATE_THRESHOLD_IN_MILLIS
Location updates more than 60 seconds old are considered stale.
|
static long |
RECENT_UPDATE_THRESHOLD_IN_NANOS |
| Constructor and Description |
|---|
FusionEngine(android.content.Context context,
LocationEngine.Callback callback) |
| 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.
|
static boolean |
isBetterThan(android.location.Location locationA,
android.location.Location locationB) |
boolean |
isProviderEnabled(java.lang.String provider) |
void |
onLocationChanged(android.location.Location location) |
void |
onProviderDisabled(java.lang.String provider) |
void |
onProviderEnabled(java.lang.String provider) |
void |
onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras) |
addRequest, createLocationAvailability, getCallback, getContext, getLooper, getRequest, removeAllRequests, removeRequestspublic static final long RECENT_UPDATE_THRESHOLD_IN_MILLIS
public static final long RECENT_UPDATE_THRESHOLD_IN_NANOS
public FusionEngine(android.content.Context context,
LocationEngine.Callback callback)
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()
throws java.lang.SecurityException
LocationEnginedisable in class LocationEnginejava.lang.SecurityExceptionpublic void onLocationChanged(android.location.Location location)
onLocationChanged in interface android.location.LocationListenerpublic void onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras)
onStatusChanged in interface android.location.LocationListenerpublic void onProviderEnabled(java.lang.String provider)
onProviderEnabled in interface android.location.LocationListenerpublic void onProviderDisabled(java.lang.String provider)
onProviderDisabled in interface android.location.LocationListenerpublic static boolean isBetterThan(android.location.Location locationA,
android.location.Location locationB)