I’m pretty much using the code from this tutorial: http://docs.coronalabs.com/tutorial/games/gameLeaderboards/index.html
There are of course endless ways that you can implement things like GPGS. I don’t use the .isConnected() API for instance. We can’t test every possible combination of what you can do. All I can say is that in the game I’m building, it works. Leaderboards show. .isConnected() prints “true”. In fact here is a video that I captured this morning
https://drive.google.com/file/d/1-3ZU8NL-hAKBOAodHEYb7seQfLv7XHEh/view?usp=sharing
using this code:
local function gameNetworkingLeaderboards() print("\*\*\* gameNetworking leaderboards \*\*\*") if gameNetwork then print("\*\*\* gameNetwork: attempting to call show leaderboard") gameNetwork.show( "leaderboards", { leaderboard = { category = "com.omnigeekmedia.alieninvasion.leaderboard" }, listener = showLeaders }) elseif gpgs then print("\*\*\* GPGS trying to show GPGS leaderboard", myData.gpgs.isConnected()) gpgs.leaderboards.show( ) end end
This is the same code that was working with v1 and it’s working with v2. You need to compare what you’re doing with this and see where you’re different. I’m not saying that we don’t have a bug, it’s very possible, but we need to know what’s different between how you’re trying to use it and how we are.
I ran your test app and here is the console log from the run:
Oct 10 10:52:13.808 ---------- Device Log Starts ---------- Oct 10 10:52:14.926 Nexus 9: Platf Oct 10 10:52:14.926 orm: Nexus 9 / ARM Neon / 7.1.1 / NVIDIA Tegra / OpenGL ES 3.1 NVIDIA 343.00 / 2018.3401 / English | US | en\_US | en Oct 10 10:52:14.971 Nexus 9: Unable Oct 10 10:52:14.971 to start service Intent { cmp=com.omnigeekmedia.Alien\_Invasion/shared.google.play.services.base.PackageStateChangedService } U=0: not found Oct 10 10:55:06.396 Nexus 9: App starting Oct 10 10:55:06.397 Nexus 9: WARNIN Oct 10 10:55:06.397 G: licensing.init() was already called for google. Nexus 9: licensingInit == true Oct 10 10:55:07.284 Nexus 9: \>\> Oct 10 10:55:07.284 Nexus 9: { Nexus 9: "name":"init", Nexus 9: "type":"init", Nexus 9: "isError":false Nexus 9: } Oct 10 10:55:08.224 Nexus 9: \>\> Oct 10 10:55:08.237 Nexus 9: { Nexus 9: Oct 10 10:55:08.238 "name":"login", Nexus 9: "phase":"logged in", Nexus 9: "isError":false Nexus 9: } Oct 10 10:55:11.061 Nexus 9: Attempting new login Oct 10 10:55:11.078 Nexus 9: \>\> Ne Oct 10 10:55:11.078 xus 9: { Nexus 9: "name":"login", Nexus 9: "phase":"logged in", Nexus 9: "isError":false Nexus 9: } Oct 10 10:55:21.718 Nexus 9: Is Oct 10 10:55:21.718 connected true
The only difference was using my Package Name, my googlePlayGamesAppId in build.settings, and my “key” in config.lua
It’s possible you don’t have something configured correctly on Google Play that the V2 plugin depends on that the V1 did not.
Rob