public class FusedLocationProvider extends LocationProviderBase implements FusionEngine.Callback
EXTRA_NO_GPS_LOCATION, FUSED_PROVIDER, mLocationManager
Constructor and Description |
---|
FusedLocationProvider(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
onDisable()
Disable the location provider.
|
void |
onDump(FileDescriptor fd,
PrintWriter pw,
String[] args)
Dump debug information.
|
void |
onEnable()
Enable the location provider.
|
int |
onGetStatus(Bundle extras)
Returns a information on the status of this provider.
|
long |
onGetStatusUpdateTime()
Returns the time at which the status was last updated.
|
void |
onSetRequest(ProviderRequestUnbundled request,
WorkSource source)
Set the
ProviderRequest requirements for this provider. |
getBinder, onSendExtraCommand, reportLocation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
reportLocation
public FusedLocationProvider(Context context)
public void onEnable()
LocationProviderBase
The provider may initialize resources, but does not yet need to report locations.
onEnable
in class LocationProviderBase
public void onDisable()
LocationProviderBase
The provider must release resources, and stop performing work. It may no longer report locations.
onDisable
in class LocationProviderBase
public void onSetRequest(ProviderRequestUnbundled request, WorkSource source)
LocationProviderBase
ProviderRequest
requirements for this provider.
Each call to this method overrides all previous requests.
This method might trigger the provider to start returning locations, or to stop returning locations, depending on the parameters in the request.
onSetRequest
in class LocationProviderBase
public void onDump(FileDescriptor fd, PrintWriter pw, String[] args)
LocationProviderBase
onDump
in class LocationProviderBase
public int onGetStatus(Bundle extras)
LocationProviderBase
LocationProvider.OUT_OF_SERVICE
is returned if the provider is
out of service, and this is not expected to change in the near
future; LocationProvider.TEMPORARILY_UNAVAILABLE
is returned if
the provider is temporarily unavailable but is expected to be
available shortly; and LocationProvider.AVAILABLE
is returned
if the provider is currently available.
If extras is non-null, additional status information may be added to it in the form of provider-specific key/value pairs.
onGetStatus
in class LocationProviderBase
public long onGetStatusUpdateTime()
LocationProviderBase
SystemClock.elapsedRealtime()
.
there is a status update that it wishes to broadcast to all its
listeners. The provider should be careful not to broadcast
the same status again.onGetStatusUpdateTime
in class LocationProviderBase