Google Fit API Activity History

前端 未结 1 915
青春惊慌失措
青春惊慌失措 2021-01-25 12:41

I have an app that integrates with Google Fit. One of the requirements is display a users favorite activity (most frequent) i.e.: bicycling. I assume it would be done through th

相关标签:
1条回答
  • 2021-01-25 13:13

    You can check this documentation: Work with the Fitness History to get most frequent activity of the user. First, you need to read data from the fitness history by creating a subscription for each fitness data type you'd like to record. This enables your app to sync with data from other devices, and also allows for the passive recording of data on the device. Then create a DataReadRequest instance. You can see the sample code in the documentation.

    The data request can specify multiple data types to return, effectively combining multiple data queries into one call. With this, you can compare which activity the user used most.

    0 讨论(0)
提交回复
热议问题