Methods Summary |
---|
public android.os.IBinder | getBinder()
return mBinder;
|
public abstract void | onDisable()Disable the location provider.
The provider must release resources, and stop
performing work. It may no longer report locations.
|
public void | onDump(java.io.FileDescriptor fd, java.io.PrintWriter pw, java.lang.String[] args)Dump debug information.
|
public abstract void | onEnable()Enable the location provider.
The provider may initialize resources, but does
not yet need to report locations.
|
public abstract int | onGetStatus(android.os.Bundle extras)Returns a information on the status of this provider.
{@link android.location.LocationProvider#OUT_OF_SERVICE} is returned if the provider is
out of service, and this is not expected to change in the near
future; {@link android.location.LocationProvider#TEMPORARILY_UNAVAILABLE} is returned if
the provider is temporarily unavailable but is expected to be
available shortly; and {@link android.location.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.
|
public abstract long | onGetStatusUpdateTime()Returns the time at which the status was last updated. It is the
responsibility of the provider to appropriately set this value using
{@link android.os.SystemClock#elapsedRealtime 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.
|
public boolean | onSendExtraCommand(java.lang.String command, android.os.Bundle extras)Implements addditional location provider specific additional commands.
// default implementation
return false;
|
public abstract void | onSetRequest(ProviderRequestUnbundled request, android.os.WorkSource source)Set the {@link 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.
|
public final void | reportLocation(android.location.Location location)Used by the location provider to report new locations.
try {
mLocationManager.reportLocation(location, false);
} catch (RemoteException e) {
Log.e(TAG, "RemoteException", e);
} catch (Exception e) {
// never crash provider, might be running in a system process
Log.e(TAG, "Exception", e);
}
|