How to differentiate between manual added steps and sensor recorded steps in Google Fit Api

前端 未结 2 722
终归单人心
终归单人心 2021-01-24 00:35

I am using Google Fit Api in my project to get user\'s daily steps. But the problem is, user can enter the steps manually by adding the activities. And when i retrieve the daily

2条回答
  •  孤街浪徒
    2021-01-24 00:45

    Basically, the example given in the Google Fit documentation states that you can get the base daily steps total of your device by using this method.

    Your app can record the user's step count by using the Recording API to create a subscription to the DataType.TYPE_STEP_COUNT_CUMULATIVE data type

    In your case, you are getting the aggregate data which is a combination of the sensor recorded steps and the data extracted using the History API.

    Try to check out the essential Google Fit API's that you will be needing:

    • Sensors API
    • Recording API
    • History API
    • Sessions API
    • Goals API
    • Bluetooth Low Energy API
    • Config API

提交回复
热议问题