English | Site Directory

Android - An Open Handset Alliance Project

android.location
public abstract class

android.location.LocationProviderImpl

java.lang.Object
android.location.LocationProvider
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

Constants inherited from class android.location.LocationProvider

Protected Constructors

          LocationProviderImpl(String name)

Public Methods

      static  void  addProvider(LocationProviderImpl provider)
abstract        void  disable()
Disables this provider.
abstract        void  enable()
Enables this provider.
abstract        Location  getLocation()
Returns a Location object containing the information gathered during the most recent fix.
      static  LocationProviderImpl  getProvider(String name)
      static  List  getProviders()
abstract        int  getStatus()
Returns a information on the status of this provider.
        void  updateCellState(CellState state)
Updates the cell state for the given provider.
        void  updateNetworkState(int state)
Updates the network state for the given provider.
Methods inherited from class android.location.LocationProvider
Methods inherited from class java.lang.Object

Details

Protected Constructors

protected LocationProviderImpl(String name)

Public Methods

public static void addProvider(LocationProviderImpl provider)

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 LocationProviderImpl getProvider(String name)

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.

Parameters

state cell state

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.

Parameters

state data state
Build m5-rc15g - 14 May 2008 12:50