本文介绍了UP3(颚骨)如何实时获取睡眠值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实时检索我的睡眠数据.我找不到如何从文档中实现它: UP平台Android SDK

I am trying to retrieve my sleep data in REAL TIME.I cannot find how to achieve it from docs:UP Platform Android SDK

P.S. :我愿意进行睡眠实验,这需要在到达例如矛盾的睡眠阶段.谢谢!

P.S. : I am willing to conduct sleep experiment that requires getting an event when I reach e.g. paradoxal sleep phase. Thanks!

推荐答案

使用 UP API ,最接近实时更新的方法是让您的应用程序注册 PubSub事件通知睡眠事件:

Using the UP APIs, the closest you can get to real time updates is to have your application register for PubSub event notifications for sleep events:

有两个限制使这些事件通知无法实时发生:

There are two limitations that will keep these event notifications from occurring exactly in real-time:

  1. PubSub事件仅在乐队将数据同步到手机时触发.
  2. PubSub睡眠事件仅针对完整睡眠而不是针对各个阶段触发.

关于#1,频段(UP24及更高版本)必须与手机建立有效的蓝牙连接,然后同步通常会在15分钟之内发生.

Regarding #1, the band (UP24 and newer) must have an active bluetooth connection with the phone and then syncs will usually occur within 15 minutes.

对于#2,计算不同的睡眠阶段目前需要查看整个睡眠事件的频段数据,因此API无法发送有关阶段变化的单独事件通知.

For #2, calculation of the different sleep phases currently requires reviewing the band data for the entire sleep event, so the API cannot send individual event notifications for phase changes.

这篇关于UP3(颚骨)如何实时获取睡眠值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 03:26