title: How to get step count from Google Fit REST API like Google Fit app?
body: <p>I'm developing a PHP application which work with Google Fit APIs to collect daily user's step count.</p>
  
  <p>I want to get my step count from "Jan 15 2015 00:00:00 GMT+0700" to "Jan 16 2015 00:00:00 GMT+0700". 
  - First, I get all my datasources.
  - Then, with each datasource which have datatype equal to "com.google.step_count.delta", I get datasets  between above timestamps and add return values together.</p>
  
  <p>My code: <a href="https://gist.github.com/daitr-gu/472c4f18522172542cca" rel="noreferrer">https://gist.github.com/daitr-gu/472c4f18522172542cca</a><br/>
  My result: <a href="https://gist.github.com/daitr-gu/1a7e11eb483a657bdc8b" rel="noreferrer">https://gist.github.com/daitr-gu/1a7e11eb483a657bdc8b</a></p>
  
  <p>I found that, there are many datasources and they returns different values. And the values are too different from what I see in Google Fit app on my phone.</p>
  
  <p>Questions: <br/>
  1. Which datasource the Google Fit app use to calculate step count? <br/>
  2. Why there are different between datasources's value and Google Fit value? <br/>
  3. How can I get the Google Fit value?﻿</p>