title: How to get the user's current speed using Google Fit's API?
body: <p>Working with the Google Fit API at the moment and having a bit of trouble with the Sensors API. I'm trying to get user's current speed for my app's workouts but the documentation is a bit confusing.</p>
  
  <p>In this code snippet is an example from Google's info page: </p>
  
  <pre><code>Fitness.SensorsApi.add(
              mClient,
              new SensorRequest.Builder()
                      // Optional but recommended for custom data sets.
                      .setDataType(DataType.TYPE_SPEED)// Can't be omitted.
                      .setSamplingRate(1, TimeUnit.SECONDS).setAccuracyMode(SensorRequest.ACCURACY_MODE_HIGH)
                      .build(), mListener3)
              .setResultCallback(new ResultCallback&lt;Status&gt;() {
                  @Override
                  public void onResult(Status status) {
                      if (status.isSuccess()) {
                          Log.i(TAG, "Listener registered!");
                      } else {
                          Log.i(TAG, "Listener not registered.");
                      }
                  }
              });
  </code></pre>
  
  <p>//Adding a Listener</p>
  
  <pre><code>mListener3 = new OnDataPointListener() {
          @Override
          public void onDataPoint(DataPoint dataPoint) {
  
  
             final float speed = dataPoint.getValue(Field.FIELD_SPEED).asFloat();
  
              runOnUiThread(new Runnable() {
                  @Override
                  public void run() {
  
                      Log.i(TAG, "In Speed" + speed );
                      speedTxtView.setText("" + speed );
  
                  }
              });
  
  
          }
  </code></pre>
  
  <p>Currently, I am getting all other datatype values like distance, heart rate ,step count and current activity but unable to get user's current speed.
  Is i am doing correctly?</p>