如何解决Google Fit-在Android中使用注册会话自动同步睡眠
每当用户从Google Fit输入新的睡眠会话时,我都需要帮助以从Google Fit获取事件。我正在使用registerforsessions来监听来自Google Fit的事件。它可以像冥想一样在其他FitnessActivity上起作用,但不能在睡眠中起作用。请帮忙。谢谢
Intent intentServiceEnd = new Intent(this.context,GoogleFitSessionService.class);
pendingIntentSession = PendingIntent.getService(this.context,intentServiceEnd,PendingIntent.FLAG_UPDATE_CURRENT);
Fitness.getSessionsClient(this.context,getGoogleSignAccount())
.registerForSessions(pendingIntentSession);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。