yanuar,
sorry it took so long.
So I was finally able to create a sample project.
I have used my appid from my old game and its package.
Here are things I did:
I’ve copied google licensing jar from CoronaEnterprise/Plugins/google-licensing/android/bin directory [I wrote it from memory, so YMMV regarding the path ;)]
I’ve copied game network google jars from CoronaEnterprisePlugins package:
CoronaProvider.gameNetwork.google.jar
google-play-services.jar
I have included following entry in my android manifest under application node:
<meta-data android:name=“com.google.android.gms.games.APP_ID” android:value="\ 123456789"/>
And this is my code from main.lua:
-- hide the status bar display.setStatusBar(display.HiddenStatusBar) local gameNetwork = require "gameNetwork" local showButton = display.newRect(100, 300, 100, 100) showButton:addEventListener("tap", function() gameNetwork.request("login") end) local cache2Button = display.newRect(300, 100, 100, 100) cache2Button:addEventListener("tap", function() gameNetwork.show("leaderboards") end) local show2Button = display.newRect(300, 300, 100, 100) show2Button:addEventListener("tap", function() gameNetwork.show("achievements") end) -- Init game network to use Google Play game services gameNetwork.init("google", function(event) logTable(event) end)
Sorry about code ugliness, I just used this project for testing my own plugins.
Anyway… logTable function pretty prints table to the console, just to check if everything is returned ok.
I first tap on the button with gameNetwork.login function call, I was able to select my account, then I tapped on achievements button and I was able to see my predefined achievements.
I think the problem you have is with the android manifest entry.
You have to remember, that normally, you would define your app id in your resources, and simply link the string in android manifest.
Since now you are specifying it manually straight in xml, you have to make sure it’s a string and not an integer.
In order to do that I used a backslash and space before the ID.
Try that, hopefully this will help.
Let me know how it went.
Krystian