Build 1.0_r1(from source)

android.test
Class TestLocationProvider

java.lang.Object
  extended by android.location.LocationProvider
      extended by android.location.LocationProviderImpl
          extended by android.test.TestLocationProvider

public class TestLocationProvider
extends LocationProviderImpl


Field Summary
static double ALTITUDE
           
static float BEARING
           
static double LAT
           
static double LON
           
static String PROVIDER_NAME
           
static float SPEED
           
static int STATUS
           
 
Fields inherited from class android.location.LocationProvider
AVAILABLE, OUT_OF_SERVICE, TEMPORARILY_UNAVAILABLE
 
Constructor Summary
TestLocationProvider()
           
 
Method Summary
 void disable()
          Disables this provider.
 void enable()
          Enables this provider.
 int getAccuracy()
          Returns a constant describing horizontal accuracy of this provider.
 boolean getLocation(Location l)
          Sets a Location object with the information gathered during the most recent fix.
 int getPowerRequirement()
          Returns the power requirement for this provider.
 int getStatus(Bundle extras)
          Returns a information on the status of this provider.
 boolean hasMonetaryCost()
          Returns true if the use of this provider may result in a monetary charge to the user, false if use is free.
 boolean isEnabled()
          Returns true if this provider is enabled, false otherwise;
 boolean requiresCell()
          Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.
 boolean requiresNetwork()
          Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.
 boolean requiresSatellite()
          Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.
 boolean supportsAltitude()
          Returns true if the provider is able to provide altitude information, false otherwise.
 boolean supportsBearing()
          Returns true if the provider is able to provide bearing information, false otherwise.
 boolean supportsSpeed()
          Returns true if the provider is able to provide speed information, false otherwise.
 
Methods inherited from class android.location.LocationProviderImpl
addProvider, enableLocationTracking, getMinTime, getProvider, getProviders, getStatus, getStatusUpdateTime, isLocationTracking, loadFromClass, removeProvider, sendExtraCommand, setMinTime, updateCellState, updateNetworkState
 
Methods inherited from class android.location.LocationProvider
getName, meetsCriteria
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER_NAME

public static final String PROVIDER_NAME
See Also:
Constant Field Values

LAT

public static final double LAT
See Also:
Constant Field Values

LON

public static final double LON
See Also:
Constant Field Values

ALTITUDE

public static final double ALTITUDE
See Also:
Constant Field Values

SPEED

public static final float SPEED
See Also:
Constant Field Values

BEARING

public static final float BEARING
See Also:
Constant Field Values

STATUS

public static final int STATUS
See Also:
Constant Field Values
Constructor Detail

TestLocationProvider

public TestLocationProvider()
Method Detail

getAccuracy

public int getAccuracy()
Description copied from class: LocationProvider
Returns a constant describing horizontal accuracy of this provider. If the provider returns finer grain or exact location, Criteria.ACCURACY_FINE is returned, otherwise if the location is only approximate then Criteria.ACCURACY_COARSE is returned.

Specified by:
getAccuracy in class LocationProvider

getPowerRequirement

public int getPowerRequirement()
Description copied from class: LocationProvider
Returns the power requirement for this provider.

Specified by:
getPowerRequirement in class LocationProvider
Returns:
the power requirement for this provider, as one of the constants Criteria.POWER_REQUIREMENT_*.

hasMonetaryCost

public boolean hasMonetaryCost()
Description copied from class: LocationProvider
Returns true if the use of this provider may result in a monetary charge to the user, false if use is free. It is up to each provider to give accurate information.

Specified by:
hasMonetaryCost in class LocationProvider

requiresCell

public boolean requiresCell()
Description copied from class: LocationProvider
Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.

Specified by:
requiresCell in class LocationProvider

requiresNetwork

public boolean requiresNetwork()
Description copied from class: LocationProvider
Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.

Specified by:
requiresNetwork in class LocationProvider

requiresSatellite

public boolean requiresSatellite()
Description copied from class: LocationProvider
Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.

Specified by:
requiresSatellite in class LocationProvider

supportsAltitude

public boolean supportsAltitude()
Description copied from class: LocationProvider
Returns true if the provider is able to provide altitude information, false otherwise. A provider that reports altitude under most circumstances but may occassionally not report it should return true.

Specified by:
supportsAltitude in class LocationProvider

supportsBearing

public boolean supportsBearing()
Description copied from class: LocationProvider
Returns true if the provider is able to provide bearing information, false otherwise. A provider that reports bearing under most circumstances but may occassionally not report it should return true.

Specified by:
supportsBearing in class LocationProvider

supportsSpeed

public boolean supportsSpeed()
Description copied from class: LocationProvider
Returns true if the provider is able to provide speed information, false otherwise. A provider that reports speed under most circumstances but may occassionally not report it should return true.

Specified by:
supportsSpeed in class LocationProvider

disable

public void disable()
Description copied from class: LocationProviderImpl
Disables this provider. When disabled, calls to LocationProviderImpl.getStatus() and LocationProviderImpl.getLocation(android.location.Location) need not be handled. Hardware may be shut down while the provider is disabled.

Specified by:
disable in class LocationProviderImpl

enable

public void enable()
Description copied from class: LocationProviderImpl
Enables this provider. When enabled, calls to LocationProviderImpl.getStatus() and LocationProviderImpl.getLocation(android.location.Location) must be handled. Hardware may be started up when the provider is enabled.

Specified by:
enable in class LocationProviderImpl

isEnabled

public boolean isEnabled()
Description copied from class: LocationProviderImpl
Returns true if this provider is enabled, false otherwise;

Specified by:
isEnabled in class LocationProviderImpl

getLocation

public boolean getLocation(Location l)
Description copied from class: LocationProviderImpl
Sets a Location object with the information gathered during the most recent fix.

Specified by:
getLocation in class LocationProviderImpl
Parameters:
l - location object to set
Returns:
true if a location fix is available

getStatus

public int getStatus(Bundle extras)
Description copied from class: LocationProviderImpl
Returns a information on the status of this provider. 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.

Specified by:
getStatus in class LocationProviderImpl

Build 1.0_r1(from source)

Please submit a feedback, bug or feature