【发布时间】:2014-02-14 16:13:00
【问题描述】:
https://developers.google.com/games/services/android/init 的 Google 文档说
您的游戏必须具有对 GoogleApiClient 对象的引用才能按顺序 对 Play 游戏服务进行任何 API 调用。在其期间 活动的生命周期,您的游戏可以检索 GoogleApiClient 在 onCreate() 之后的任何时间,通过调用 getApiClient() 来创建对象。为了 示例:
Games.Leaderboards.submitScore(getApiClient(), LB_ID, 12345);
最初页面还显示:
BaseGameActivity 类封装了 GoogleApiClient,从而降低了与 Google Play 服务器建立连接和管理用户登录的复杂性。
但是,我在BaseGameActivity 或GameHelper 中找不到getApiClient()。它在哪里?
【问题讨论】:
标签: android google-play-services