title: location.getspeed() update
body: <p>I have a litte problem. I located a <code>location.getSpeed()</code> method on the <code>onLocationChanged()</code> method, and <code>.getSpeed()</code> usually doesn't update/change to 0km/h when I stay in same place.</p>
  
  <p>Where should I locate a <code>location.getGpeed()</code> method, that the update showed 0km/h when I stay in place?</p>
  
  <p>And another question. This is my <code>locationListener</code>:</p>
  
  <pre><code>private final LocationListener locationListener = new LocationListener() 
      {public void onLocationChanged(Location location) {     
      boolean var = false;
      float distance;
  
          if (firstRun) { distance=0; firstRun=false; }
          else
          distance = location.distanceTo (startLocation);
          Tspeed.setText("0km/h");
  
  
          if (location.getSpeed()!=0) 
          {
              Tspeed.setText(""+(location.getSpeed()*3600/1000 +"km/h")); 
          }
          else
          {
              Tspeed.setText("0km/h");
          }
  
  
          sAllDistance += distance;  // 
          startLocation=location;
          Tdistance.setText(""+(int)SAllDistance+" m");
  
      }
  </code></pre>
  
  <p>The problem is: when the <code>LocationManager</code> get the fix, the first <code>AllDistance</code> returned from <code>location.distanceTo()</code> is ±50 meters.</p>
  
  <p>How can I fix it?</p>