hey guys the last time i was on the forums had a little problem with my leader board system, i went on to solving that problem. Now i have another problem some times my leader board gives me the welcome … on in the main screen, and some time it didn’t. so this lead me to think my leader board system is not logging properly. i have follow the step correctly to create my SHA1 finger print correctly and and setting up my lua callings, so i don’t know why i am getting this error of failed to log in to leader board. Here’s my build settings and code
-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight -- build settings settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight", } }, iphone = { plist = { CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png" , "Icon@2x.png" , "Icon-72.png", "Icon-xxhdpi.png", "Icon-hdpi.png" }, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", -- example scheme for facebook "coronasdkapp", -- example second scheme } } } --]] } }, -- Android permissions androidPermissions = { "android.permission.INTERNET", }, android = { googlePlayGamesAppId = "1093344193242" --long App ID number (use yours!) }, plugins = { ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", }, }, }
and my code …
local gameNetwork = require "gameNetwork" local init; function initCallback( event ) if not event.isError then init = true print("initCallback success"); else init = false print("initCallback failed", event.errorMessage); end end function requestCallback(isError) if (isError) then print("login failed") else print("login success") end end print( "Calling gameNetwork.init") gameNetwork.init( "google", initCallback ) print("Calling login") gameNetwork.request( "login", { userInitiated = true, listener = requestCallback }) print("calling leaderboards") gameNetwork.show( "leaderboards" ) print("calling achievements") gameNetwork.show( "achievements" )
and i went ahead and use the ADB manager and it say…
V/Corona ( 6127): \> Class.forName: network.LuaLoader V/Corona ( 6127): \< Class.forName: network.LuaLoader V/Corona ( 6127): Loading via reflection: network.LuaLoader V/Corona ( 6127): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 6127): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 6127): Loading via reflection: CoronaProvider.licensing.google.LuaLo ader V/Corona ( 6127): WARNING: Asset file "start background01@2x.png" does not exis t. I/Corona ( 6127): Calling gameNetwork.init V/Corona ( 6127): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona ( 6127): \< Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona ( 6127): Loading via reflection: CoronaProvider.gameNetwork.google.Lua Loader I/Corona ( 6127): Calling login I/Corona ( 6127): calling leaderboards I/Corona ( 6127): calling achievements I/Corona ( 6127): initCallback success I/Corona ( 6127): login failed -- my error C:\Users\sean\android projects\andoid sdk\sdk\platform-tools\>
so what could be my problem ? Also my leader board package name and app package name match each other. i Also use this blog as a guide https://coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/.
Thanks for your Help :}] :) PS i am using the google leader board system