Google Play game services - Login issue

Hi,

I started using gpgm in my Android app, and I’ve noticed a very strange thing. When I try to login the application just crashes showing me an alert saying that the app crashed. I have found the error but I don’t know how to fix it. It’s all caused by the userInitiated=true in the login request. I’m 100% that this is the problem. Because it tries to resolve some kind of issue logging-in but it ends crashing the app. If I set it to false I can’t login. But the strangest thing about this is that if I install this app with the same code on another Android tablet it works all fine. Maybe tablet settings is the problem? This is my code.

build.settings

settings = { orientation = { default = "portrait", }, android = { googlePlayGamesAppId = "123456789012", }, plugins = { --key is the name passed to the Lua "require()" ["CoronaProvider.gameNetwork.google"] = { --required! publisherId = "com.coronalabs", }, }, }

main.lua

display.setStatusBar( display.HiddenStatusBar ) local gameNetwork = require "gameNetwork" local loggedIntoGC = false local function googleLogin() local function requestCallback(event) if(event.isError) then print("ERROR LOGGING IN") else loggedIntoGC = true print("SUCCESS") end end if(not loggedIntoGC) then gameNetwork.request( "login", { userInitiated=true, listener=requestCallback }) elseif(gameNetwork.request("isConnected")) then print("GAMENETWORK IS CONNECTED") else print("GAMENETWORK IS NOT CONNECTED") end end local function initCallback(event) print("GOOGLE SERVICES INITIALIZED") print(event.data) googleLogin() end print("CALLING INIT") gameNetwork.init("google", initCallback)

Thank you a lot,

Andrea

Hi,

What was in your log when it crashed?  What device was it?

Hi,

What was in your log when it crashed?  What device was it?