FileDocCategorySizeDatePackage
DummyLocationProvider.javaAPI DocAndroid 1.5 API4857Wed May 06 22:42:00 BST 2009android.location

DummyLocationProvider

public 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. {@hide}

Fields Summary
private static final String
TAG
String
mName
boolean
mRequiresNetwork
boolean
mRequiresSatellite
boolean
mRequiresCell
boolean
mHasMonetaryCost
boolean
mSupportsAltitude
boolean
mSupportsSpeed
boolean
mSupportsBearing
int
mPowerRequirement
int
mAccuracy
Constructors Summary
DummyLocationProvider(String name)


    /* package */   
        super(name);
    
Methods Summary
public intgetAccuracy()
Returns a constant describing the horizontal accuracy returned by this provider.

return
the horizontal accuracy for this provider, as one of the constants Criteria.ACCURACY_*.

        return mAccuracy;
    
public intgetPowerRequirement()
Returns the power requirement for this provider.

return
the power requirement for this provider, as one of the constants Criteria.POWER_REQUIREMENT_*.

        return mPowerRequirement;
    
public booleanhasMonetaryCost()
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.

        return mHasMonetaryCost;
    
public booleanrequiresCell()
Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.

        return mRequiresCell;
    
public booleanrequiresNetwork()
Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.

        return mRequiresNetwork;
    
public booleanrequiresSatellite()
Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.

        return mRequiresSatellite;
    
public voidsetAccuracy(int accuracy)

        mAccuracy = accuracy;
    
public voidsetHasMonetaryCost(boolean hasMonetaryCost)

        mHasMonetaryCost = hasMonetaryCost;
    
public voidsetPowerRequirement(int powerRequirement)

        mPowerRequirement = powerRequirement;
    
public voidsetRequiresCell(boolean requiresCell)

        mRequiresCell = requiresCell;
    
public voidsetRequiresNetwork(boolean requiresNetwork)

        mRequiresNetwork = requiresNetwork;
    
public voidsetRequiresSatellite(boolean requiresSatellite)

        mRequiresSatellite = requiresSatellite;
    
public voidsetSupportsAltitude(boolean supportsAltitude)

        mSupportsAltitude = supportsAltitude;
    
public voidsetSupportsBearing(boolean supportsBearing)

        mSupportsBearing = supportsBearing;
    
public voidsetSupportsSpeed(boolean supportsSpeed)

        mSupportsSpeed = supportsSpeed;
    
public booleansupportsAltitude()
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.

        return mSupportsAltitude;
    
public booleansupportsBearing()
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.

        return mSupportsBearing;
    
public booleansupportsSpeed()
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.

        return mSupportsSpeed;