code that use location.getspeed code example
Example: how use location.getspeed
/**
* Returns the current speed
*
* @return the current speed (if detected) or `0`
*/
public float getSpeed() {
if (mPosition == null) {
return 0.0f;
}
else {
return mPosition.getSpeed();
}
}