[HMS Core] How does Health Kit obtain the track records of running exercise records?

【Problem Description】

Using the interface, "/healthkit/v1/activityRecords", you can get running records normally, but there is no track data in it, how should you get the track record data of each record?

 

【solution】

1. Obtaining track records of exercise records requires atomic sampling data associated with GPS details.

cke_6931.png

See the atomic sampling data that a run can correlate with:

https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/running-0000001131918792#section197671417152417

2. Before obtaining trajectory data, you need to apply for relevant permissions:

cke_1159.png

Relevant OAuth permission instructions:

https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/introduction-fitness-record-data-0000001131831088#section27171294263

3. Poatman request example:

Sports record query:

https://developer.huawei.com/consumer/cn/doc/development/HMSCore-References/activityrecords_list-0000001050114862

cke_7765.png

Example of a running exercise recording scene:

https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/running-sence-0000001212292245#section2719231163210

 

 

 For more comprehensive technical articles, please visit https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh

{{o.name}}
{{m.name}}

Supongo que te gusta

Origin my.oschina.net/u/4478396/blog/8785109
Recomendado
Clasificación