【发布时间】:2014-06-04 16:25:25
【问题描述】:
开发者网站建议可以通过将自定义 inboxIntent 引用为“默认用户界面”来使用它们,但我似乎找不到任何有关如何执行此操作的信息。
https://developers.google.com/games/services/android/turnbasedMultiplayer#handling_invitations
有人能对此有所了解吗?
【问题讨论】:
开发者网站建议可以通过将自定义 inboxIntent 引用为“默认用户界面”来使用它们,但我似乎找不到任何有关如何执行此操作的信息。
https://developers.google.com/games/services/android/turnbasedMultiplayer#handling_invitations
有人能对此有所了解吗?
【问题讨论】:
Mitch,在 Realtime Multiplayer 文档中,有一个关于 Inbox UI 的部分,可能是谷歌的错误,没有将其包含在 Turnbased Multiplayer b> 文档。
因此,您必须使用getInboxIntent(GoogleApiClient apiClient) 检索收件箱Intent,然后使用startActivityForResult 启动收件箱Activity。喜欢:
// request code (can be any number, as long as it's unique)
final static int RC_INVITATION_INBOX = 10001;
// launch the intent to show the invitation inbox screen
Intent intent = Games.Invitations.getInvitationInboxIntent(mClient);
mActivity.startActivityForResult(intent, RC_INVITATION_INBOX);
在 Google Play Games Multiplayer Realtime 中查看From the Invitation Inbox。
【讨论】:
在这里您可以找到如何请求所有正在运行和已完成的比赛的列表:
TurnBasedMultiplayer - onTurnBasedMatchesLoaded does not get called
【讨论】: