我尝试在我的cocos2d-x游戏中设置Google Play游戏服务。为此,我使用了BaseGameActivity.java和GameHelper.java文件,因此我的主类继承自BaseGameActivity。
当我调用mHelper.beginUserInitiatedSignIn()时,它会显示Google Play活动,然后隐藏它。但是回调(onSignInSucceeded和onSignInFailed)没有被调用。当我尝试再次调用mHelper.beginUserInitiatedSignIn()时,它会发送消息“GameHelper WARNING: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.
mHelper.setup(listener)
来设置GameHelper了吗? - Paul Lammertsma