阻止WorkoutSession更新活动环 [英] prevent WorkoutSession to update Activity ring

查看:56
本文介绍了阻止WorkoutSession更新活动环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Apple Watch应用程序(WatchOs4).我有兴趣监视心率,因此我正在使用WorkoutSession来获取连续的数据更新.问题是:当我开始锻炼时,它将自动更新手表上活动环"的运动环.由于它不是运动应用程序,因此我想避免这种情况.

I'm developing an apple watch application (WatchOs4). I'm interested to monitor heart rate, so I'm using a WorkoutSession to get continuous data updates. The problem is : when I start a workout session, it will automatically update the exercise ring of the Activity Rings on the watch. As it's not a sport app, I would like to prevent that.

有人对此有解决方案吗?

Does anyone have a solution for that ?

推荐答案

请检查 https://developer.apple.com/documentation/healthkit/hkworkoutsession 填写铃声"部分.

Please check https://developer.apple.com/documentation/healthkit/hkworkoutsession Filling the Rings section.

通过以下活动之一设置锻炼,这些活动包括跑步,步行,骑自行车,爬楼梯,椭圆和划船,这些活动可提供自定义的卡路里计算.因此,如果您不动,则不会对环产生任何影响.

Set your workout in one of the following activities run, walk, cycle, stair climbing, elliptical, and rowing activities which provide customized calorie calculations. So if you didn't move, nothing will be contributed to the ring.

仅供参考,我只尝试过室内步行.

FYI I only tried indoor walking.

这篇关于阻止WorkoutSession更新活动环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆