android - Google Play 游戏服务登录回调

标签 android eclipse google-play-services google-play-games

我尝试在我的 cocos2d-x 游戏中设置 google play 游戏服务。我用的是这个BaseGameActivity.java和GameHelper.java文件,所以我的主类是继承自BaseGameActivity的。 当我调用 mHelper.beginUserInitiatedSignIn() 时,它会显示 google play Activity ,然后将其隐藏。但是没有调用回调(onSignInSucceeded 和 onSignInFailed)。当我再次尝试调用 mHelper.beginUserInitiatedSignIn() 时,它向我发送消息“GameHelper 警告:已经连接时调用了 beginUserInitiatedSignIn()...”。

!!! GameHelper WARNING: beginUserInitiatedSignIn() called when already connecting. Be patient! You can only call this method after you get an onSignInSucceeded() or onSignInFailed() callback. Suggestion: disable the sign-in button on startup and also when it's clicked, and re-enable when you get the callback.

最佳答案

Google Play Game Services: strange sign in behavior

super.onActivityResult(requestCode, resultCode, data);

关于android - Google Play 游戏服务登录回调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22744751/

相关文章:

android - 在 AsyncTask 中收到每个项目后调用 notifyDataSetChanged

android - Google Play 服务非多人邀请挑战消息

android-studio - 如何将 GooglePlayServices 和 BaseGameUtils 库添加到 Android Studio 4.4

java - Google Play - 安装了应用内更新,但一次又一次显示更新可用

eclipse - 带有 Eclipse 的 iReport : how to use it?

android - Fragment 后台堆栈中的 ListView 仍在调用 getView()

android - 如何对使用 Spinner 选定位置的功能进行单元测试?

android - Eclipse Android Common XML 编辑器无法在模式之间切换

eclipse - Google AppEngine 开发应用程序服务器不会在本地主机上运行

eclipse - 如何防止 superDevMode 出现在我的参数中?