【发布时间】:2016-06-11 12:03:57
【问题描述】:
我有一个 GoogleApiClient。我使用此代码:
GoogleApiClient client = new GoogleApiClient.Builder(this).addApi(Games.API).addScope(Games.SCOPE_GAMES).addApiIfAvailable(Wearable.API).addConnectionCallbacks(this).addOnConnectionFailedListener(this).build();
如果用户想连接 Google Play 游戏,我在 SharedPrefs 中存储了一个布尔值。如果是,我打电话给client.connect()。但如果不是我仍然想要,Wearable API 已连接。我怎样才能实现,Wearable API 将始终连接,但 Games API 不连接。
【问题讨论】:
标签: android wear-os google-play-games google-api-client