如何更改Google健身会话的名称?

时间:2017-04-15 22:12:28

标签: android google-fit google-fit-sdk

创建新Session时,我可以为其指定名称:

Session session = new Session.Builder()
    .setName(sessionName)

如何使用Google Fit API更改现有Session的此名称?

1 个答案:

答案 0 :(得分:0)

尝试使用Users.sessions,然后使用更新或插入给定会话的update方法。

HTTP请求

PUT https://www.googleapis.com/fitness/v1/users/userId/sessions/sessionId

请参阅本教程 - Google Fit for Android: Sessions API,演示如何使用Sessions API。

希望这有帮助。