android.location
public
abstract
class
android.location.LocationProviderImpl
An abstract superclass for location provider implementations.
Location provider implementations are typically instantiated by the
location manager service in the system process, and location
information is made available to implementations via the manager.
Summary
Protected Constructors
Public Methods
getAccuracy,
getName,
getPowerRequirement,
hasMonetaryCost,
meetsCriteria,
requiresCell,
requiresNetwork,
requiresSatellite,
supportsAltitude,
supportsBearing,
supportsSpeed
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Protected Constructors
protected
LocationProviderImpl(String name)
Public Methods
public
abstract
void
disable()
Disables this provider. When disabled, calls to getStatus()
and getLocation() need not be handled. Hardware may be shut
down while the provider is disabled.
public
abstract
void
enable()
Enables this provider. When enabled, calls to getStatus()
and getLocation() must be handled. Hardware may be started up
when the provider is enabled.
public
abstract
Location
getLocation()
Returns a Location object containing the information gathered
during the most recent fix.
public
static
List
getProviders()
public
abstract
int
getStatus()
Returns a information on the status of this provider.
OUT_OF_SERVICE is returned if the provider is
out of service, and this is not expected to change in the near
future; TEMPORARILY_UNAVAILABLE is returned if
the provider is temporarily unavailable but is expected to be
available shortly; and AVAILABLE is returned
if the provider is currently available.
public
void
updateCellState(CellState state)
Updates the cell state for the given provider. This function must be
overwritten if
requiresCell() returns true.
public
void
updateNetworkState(int state)
Updates the network state for the given provider. This function must
be overwritten if
requiresNetwork() returns true. It returns
TEMPORARILY_UNAVAILABLE (connecting), OUT_OF_SERVICE (disconnected)
OR AVAILABLE.