简体   繁体   English

HealthKit,内置睡眠检测在睡眠计划之外不起作用

[英]HealthKit, built-in sleep detection does not work outside sleep schedule

Do I understand correctly that the HealthKit sleep tracking feature does not always read past sleep (start datetime, end datetime)?我是否正确理解 HealthKit 睡眠跟踪功能并不总是读取过去的睡眠(开始日期时间,结束日期时间)? It only works when enabled in the settings and 'understands' when a person has fallen asleep exclusively within the time frame that the user has set as the desired "start" and "end" of sleep (I mean what is shown in the screenshot below)?它仅在设置中启用时才有效,并且“理解”一个人在用户设置为所需的睡眠“开始”和“结束”的时间范围内完全入睡(我的意思是下面的屏幕截图中显示的内容)?

I'll give you an example: I fell asleep during the day, not at night - HealthKit has 0 information about past sleep, apple watch didn't even detect that.我给你举个例子:我白天睡着了,而不是晚上——HealthKit 有 0 条关于过去睡眠的信息,Apple Watch 甚至没有检测到。

Another example: I fell asleep at night, apple watch woke me up with an alarm at the end of my "desired" sleep interval, I turned it off and continued sleeping.另一个例子:我晚上睡着了,苹果手表在我“想要的”睡眠间隔结束时用闹钟把我叫醒,我把它关掉继续睡觉。 As a result, the clock counted that I slept until the alarm rang and then was awake.结果,时钟数着我睡着了,直到闹钟响起,然后才醒。

As a corollary question, in order to 100% define the session of sleep in my app, I have to write my own algorithm and do not rely on apple watch built-in sleep tracking?作为一个必然的问题,为了在我的应用程序中 100% 定义睡眠的 session,我必须编写自己的算法并且不依赖 Apple Watch 内置的睡眠跟踪? I need advices.我需要建议。

...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM