UP3 (jawbone) how to retrieve sleep value in REALTIME

故事扮演 提交于 2019-12-20 05:28:38

问题


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. : I am willing to conduct sleep experiment that requires getting an event when I reach e.g. paradoxal sleep phase. Thanks!


回答1:


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 events are only triggered when the band syncs data to the phone.
  2. PubSub sleep events are only triggered for a complete sleep and not for individual phases.

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.

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.



来源:https://stackoverflow.com/questions/37799916/up3-jawbone-how-to-retrieve-sleep-value-in-realtime

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!