I have setup my leaderboards in google play and added testers by their email address. I have the most simple test code to check if everything is working but I get no response. Its in testing mode right now and done on release build , not published yet.
This is my main.lua:
local gameNetwork = require “gameNetwork”
– Init game network to use Google Play game services
gameNetwork.init(“google”)
local leaderboardId = “CgkIwMf-sKkYEAIQAQ” – Your leaderboard id here
local achievementId = “CgkIwMf-sKkYEAIQBQ” – Your achievement id here
– Tries to automatically log in the user without displaying the login screen if the user doesn’t want to login
gameNetwork.request(“login”,{userInitiated = false})
local function showLeaderboardListener(event)
gameNetwork.show(“leaderboards”) – Shows all the leaderboards.
end
–show leaderboard button
local showLeaderboardButton = display.newText( “leaderboard”, display.contentCenterX, display.contentHeight*0.79, “AREO”, 25 )
–login button
local loginLogoutButton = display.newText( “logout”, display.contentCenterX, display.contentHeight/2, “AREO”, 25 )
loginLogoutButton:addEventListener( “tap”, showLeaderboardListener)
showLeaderboardButton:addEventListener( “tap”, showLeaderboardListener)
– Checks if the auto login worked and if it did then change the text on the button
if gameNetwork.request(“isConnected”) then
loginLogoutButton:setLabel(“Logout”)
end
and my build.settings:
settings =
{
orientation =
{
default = “landscapeRight”,
supported = { “portrait” }
},
android =
{
googlePlayGamesAppId = “835742311360”, – Your Google Play Games App Id
},
plugins =
{
– key is the name passed to Lua’s ‘require()’
[“CoronaProvider.gameNetwork.google”] =
{
– required
publisherId = “com.coronalabs”,
supportedPlatforms = { android = true }
},
},
}
Any suggestions where I’m going wrong?