Methods Summary |
---|
public void | disable()
mEnabled = false;
|
public void | enable()
mEnabled = true;
|
public int | getAccuracy()
return Criteria.ACCURACY_COARSE;
|
public boolean | getLocation(android.location.Location l)
updateLocation();
l.set(mLocation);
return true;
|
public int | getPowerRequirement()
return Criteria.NO_REQUIREMENT;
|
public int | getStatus(android.os.Bundle extras)
return STATUS;
|
public boolean | hasMonetaryCost()
return false;
|
public boolean | isEnabled()
return mEnabled;
|
public boolean | requiresCell()
return false;
|
public boolean | requiresNetwork()
return false;
|
public boolean | requiresSatellite()
return false;
|
public boolean | supportsAltitude()
return true;
|
public boolean | supportsBearing()
return true;
|
public boolean | supportsSpeed()
return true;
|
private void | updateLocation()
long time = SystemClock.uptimeMillis();
long multiplier = (time/5000)%500000;
mLocation.setLatitude(LAT*multiplier);
mLocation.setLongitude(LON*multiplier);
mLocation.setAltitude(ALTITUDE);
mLocation.setSpeed(SPEED);
mLocation.setBearing(BEARING*multiplier);
Bundle extras = new Bundle();
extras.putInt("extraTest", 24);
mLocation.setExtras(extras);
mLocation.setTime(time);
|