【问题标题】:Custom multiplayer inboxIntent自定义多人收件箱意图
【发布时间】:2014-06-04 16:25:25
【问题描述】:

开发者网站建议可以通过将自定义 inboxIntent 引用为“默认用户界面”来使用它们,但我似乎找不到任何有关如何执行此操作的信息。

https://developers.google.com/games/services/android/turnbasedMultiplayer#handling_invitations

有人能对此有所了解吗?

【问题讨论】:

    标签: android google-play-games


    【解决方案1】:

    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

    【讨论】:

      【解决方案2】:

      在这里您可以找到如何请求所有正在运行和已完成的比赛的列表:

      TurnBasedMultiplayer - onTurnBasedMatchesLoaded does not get called

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-08-27
        • 1970-01-01
        • 2017-11-02
        • 1970-01-01
        • 1970-01-01
        • 2016-05-19
        • 1970-01-01
        • 2012-06-10
        相关资源
        最近更新 更多