Build 1.0_r1(from source)

android.location
Class DummyLocationProvider

java.lang.Object
  extended by android.location.LocationProvider
      extended by android.location.DummyLocationProvider

 class DummyLocationProvider
extends LocationProvider

A stub implementation of LocationProvider used by LocationManager. A DummyLocationProvider may be queried to determine the properties of the provider whcih it shadows, but does not actually provide location data.


Field Summary
(package private)  int mAccuracy
           
(package private)  boolean mHasMonetaryCost
           
(package private)  String mName
           
(package private)  int mPowerRequirement
           
(package private)  boolean mRequiresCell
           
(package private)  boolean mRequiresNetwork
           
(package private)  boolean mRequiresSatellite
           
(package private)  boolean mSupportsAltitude
           
(package private)  boolean mSupportsBearing
           
(package private)  boolean mSupportsSpeed
           
 
Fields inherited from class android.location.LocationProvider
AVAILABLE, BAD_CHARS_REGEX, OUT_OF_SERVICE, TEMPORARILY_UNAVAILABLE
 
Constructor Summary
DummyLocationProvider(String name)
           
 
Method Summary
 int getAccuracy()
          Returns a constant describing the horizontal accuracy returned by this provider.
 int getPowerRequirement()
          Returns the power requirement for 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 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.
 void setAccuracy(int accuracy)
           
 void setHasMonetaryCost(boolean hasMonetaryCost)
           
 void setPowerRequirement(int powerRequirement)
           
 void setRequiresCell(boolean requiresCell)
           
 void setRequiresNetwork(boolean requiresNetwork)
           
 void setRequiresSatellite(boolean requiresSatellite)
           
 void setSupportsAltitude(boolean supportsAltitude)
           
 void setSupportsBearing(boolean supportsBearing)
           
 void setSupportsSpeed(boolean supportsSpeed)
           
 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.LocationProvider
getName, meetsCriteria
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mName

String mName

mRequiresNetwork

boolean mRequiresNetwork

mRequiresSatellite

boolean mRequiresSatellite

mRequiresCell

boolean mRequiresCell

mHasMonetaryCost

boolean mHasMonetaryCost

mSupportsAltitude

boolean mSupportsAltitude

mSupportsSpeed

boolean mSupportsSpeed

mSupportsBearing

boolean mSupportsBearing

mPowerRequirement

int mPowerRequirement

mAccuracy

int mAccuracy
Constructor Detail

DummyLocationProvider

DummyLocationProvider(String name)
Method Detail

setRequiresNetwork

public void setRequiresNetwork(boolean requiresNetwork)

setRequiresSatellite

public void setRequiresSatellite(boolean requiresSatellite)

setRequiresCell

public void setRequiresCell(boolean requiresCell)

setHasMonetaryCost

public void setHasMonetaryCost(boolean hasMonetaryCost)

setSupportsAltitude

public void setSupportsAltitude(boolean supportsAltitude)

setSupportsSpeed

public void setSupportsSpeed(boolean supportsSpeed)

setSupportsBearing

public void setSupportsBearing(boolean supportsBearing)

setPowerRequirement

public void setPowerRequirement(int powerRequirement)

setAccuracy

public void setAccuracy(int accuracy)

requiresNetwork

public boolean requiresNetwork()
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()
Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.

Specified by:
requiresSatellite in class LocationProvider

requiresCell

public 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.

Specified by:
requiresCell in class LocationProvider

hasMonetaryCost

public boolean hasMonetaryCost()
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

supportsAltitude

public boolean supportsAltitude()
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

supportsSpeed

public boolean supportsSpeed()
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

supportsBearing

public boolean supportsBearing()
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

getPowerRequirement

public int getPowerRequirement()
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_*.

getAccuracy

public int getAccuracy()
Returns a constant describing the horizontal accuracy returned by this provider.

Specified by:
getAccuracy in class LocationProvider
Returns:
the horizontal accuracy for this provider, as one of the constants Criteria.ACCURACY_*.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature