|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.location.LocationProvider
android.location.LocationProviderImpl
android.test.TestLocationProvider
public class TestLocationProvider
| 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 |
|---|
public static final String PROVIDER_NAME
public static final double LAT
public static final double LON
public static final double ALTITUDE
public static final float SPEED
public static final float BEARING
public static final int STATUS
| Constructor Detail |
|---|
public TestLocationProvider()
| Method Detail |
|---|
public int getAccuracy()
LocationProviderCriteria.ACCURACY_FINE is returned, otherwise if the
location is only approximate then Criteria.ACCURACY_COARSE
is returned.
getAccuracy in class LocationProviderpublic int getPowerRequirement()
LocationProvider
getPowerRequirement in class LocationProviderpublic boolean hasMonetaryCost()
LocationProvider
hasMonetaryCost in class LocationProviderpublic boolean requiresCell()
LocationProvider
requiresCell in class LocationProviderpublic boolean requiresNetwork()
LocationProvider
requiresNetwork in class LocationProviderpublic boolean requiresSatellite()
LocationProvider
requiresSatellite in class LocationProviderpublic boolean supportsAltitude()
LocationProvider
supportsAltitude in class LocationProviderpublic boolean supportsBearing()
LocationProvider
supportsBearing in class LocationProviderpublic boolean supportsSpeed()
LocationProvider
supportsSpeed in class LocationProviderpublic void disable()
LocationProviderImplLocationProviderImpl.getStatus()
and LocationProviderImpl.getLocation(android.location.Location) need not be handled. Hardware may be shut
down while the provider is disabled.
disable in class LocationProviderImplpublic void enable()
LocationProviderImplLocationProviderImpl.getStatus()
and LocationProviderImpl.getLocation(android.location.Location) must be handled. Hardware may be started up
when the provider is enabled.
enable in class LocationProviderImplpublic boolean isEnabled()
LocationProviderImpl
isEnabled in class LocationProviderImplpublic boolean getLocation(Location l)
LocationProviderImpl
getLocation in class LocationProviderImpll - location object to set
public int getStatus(Bundle extras)
LocationProviderImplLocationProvider.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.
getStatus in class LocationProviderImpl
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||