android - 防止 GoogleApiClient 在 onStop() 上断开连接

标签 android google-play-games

我正在使用 Google Play 游戏服务开发一款游戏,特别是一款实时多人游戏。现在我对 GoogleApiClient 的建议使用模式有疑问其中包括调用 disconnect()onStop()期间,这会导致游戏停止,例如,如果玩家接到电话。 一个可能的解决方案是使用 bound Service但问题仍然存在,因为我应该调用 unbindService() . 解决这个问题的常用方法是什么?我搜索了互联网但没有结果。 提前谢谢你。

最佳答案

看来我在搜索时使用了错误的关键字,这两个链接提供了详尽的答案:

关于android - 防止 GoogleApiClient 在 onStop() 上断开连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28660667/

相关文章:

android - GeoTrust 是 Android => 2.3 中受信任的根证书之一吗?

android - Twitter4j API 不会在 android 中按下后退按钮时重定向到应用程序

android - 在android中的饼图上单击事件

android - 如何以正确的方式向日历添加日期

android - Google+ 登录无法正常工作

android - android中的矩形触摸

android - 使用谷歌登录游戏服务

Android 回合制多人游戏 - 如何在屏幕关闭时获取比赛更新?

android - iOS-Google Play 游戏服务的可用性回合制多人游戏

android - 当应用程序进入后台时,实时多人 Google Play 游戏服务对等方会断开连接