Google Play Games Services v2 (plugin beta)

Just checked gpgs version 2 beta.

Replacing “plugin.gpgs” with “plugin.gpgs.v2” where needed.

 

I was checking snapshots functionality in one of my games (live on play store).

 

Google Play Games window appeared only once (although I did data reset or reinstall)

Didn’t retrieve info and there are a lot of crashes in device.

 

I will check it again next week and post logs too.

 

Anyone else?

Hi @genelixis

This isn’t all that helpful to us. Can you share what errors your getting and the code you’re using that’s failing? It’s really hard for me to go to the engineers with “It’s not working. Fix it” with no specifics.

Copies of the errors from the device’s console log would be really great.

Rob

You are right Rob!

As I said, I will test it again and post logs next week.

I’m waiting, at least, Google Play Services login window to start appearing :slight_smile:

Also sample link is not working.

That would help everybody, a lot!!

@rob, I’m about to go live with a new app - should I be using this beta plugin?

The GPGS v2 plugin was in a **closed** test. We had invited a few specific people to work on it. Somehow it was made public. It is not ready to be used in production apps.

We were trying to fix a particular issue that Google was flagging with logins during some feature review. Very few people have reported this problem and the GPGS v1 plugin is working just fine for almost everyone. However to address this problem (which we suspect will impact more people in the future) we had to completely re-write the entire plugin. That means we have to exercise every node.

The only people who should be using the v2 plugin now are those who are willing to test it and share code and report errors and not have it impact their production.

@genelixis I don’t know that not seeing a login popup is a bug that prevents you from testing this. It does appear to successfully log you in.  

Rob

GPGS v1 plugin is not working if you do a build now.

Login popup appears but save / retrieve data using snapshots is not working.

Am I wrong?

We haven’t touched the V1 plugin.

EDIT: we did update the plugin on 8/8 to work with Android API level 27.

Rob

I haven’t touched my code either but save / retrieve data using snapshots is not working if I make a new build.

Other people can make a build now with gpgs v1 and save / retrieve data using snapshots is working for them?

A few days ago I emailed code and logs @coronalabs because gpgs save / retrieve data using snapshots stopped working.

The answer came from the engineers: 

The problem occurs because I use an old version of gpgs.

I should wait for the new version, gpgs-v2, which wil be released soon.

Then you should wait for us to formally release the plugin. Hopefully, it will be soon.

Rob

Any news related to gpgs version 2 plugin?

My tests have all been successful, but the code for snapshots that I was using doesn’t work and needed updated. I’m trying to see how other testers results are going as I’m not privy to those communications.

Rob

Same here Rob.

Snapshots code doesn’t work and community really need it.

If there is a change in code or a workaround to make it work could you share it here please?

Please keep us updated if any news arise!

I’m happy to share the snapshot code from my test app. Again, it’s purely test code and my old code-pre-change once worked with the old plugin, so I can’t say this will work with the V1 plugin or not.

local myTable = { play = 1 } local snapshotFilename = "snapshot1" local data = json.encode( myTable ) local function gpgsSnapshotOpenForReadListener( event ) print( "snapshot open event:", json.prettify(event) ) if not event.isError then --local data = event.snapshot.contents.read() local data = gpgs.snapshots.getSnapshot (event.snapshotId) native.showAlert('Snapshots', 'Reading was ' .. (event.isError and 'unsuccessful' or 'successful') .. ',', { 'OK'}) end end local function gpgsSnapshotAfterSaveListener( event ) native.showAlert('Snapshots', 'Saving was ' .. (event.isError and 'unsuccessful' or 'successful') .. '.', {'OK'}) end local function openSnapshot() print("Opening snapshot") gpgs.snapshots.open({ filename = snapshotFilename, listener = gpgsSnapshotOpenForReadListener }) end local function gpgsSnapshotOpenForSaveListener( event ) print("open for save listener", json.prettify( event )) if not event.isError then local snapContent = gpgs.snapshots.getSnapshot(event.snapshotId).contents snapContent.write(data) -- Write new data as a JSON string into the snapshot gpgs.snapshots.save({ snapshotId = event.snapshotId, description = 'Save slot ' .. snapshotFilename, listener = gpgsSnapshotAfterSaveListener }) end end local function saveSnapshot() print("saving snapshhot") gpgs.snapshots.open({ -- Open the save slot filename = snapshotFilename, create = true, -- Create the snapshot if it's not found listener = gpgsSnapshotOpenForSaveListener }) end

There are still some issues we are working on with the testers so even if you managed to get access to the plugin when it was inadvertently made available, I still wouldn’t release against the V2 plugin until we say it’s ready.

Rob

1 Like

I had this for gpgs version 1 and used to work (now it’s broken) like charm.

https://forums.coronalabs.com/topic/67896-how-to-implement-gpgs-plugin/

I can see the changes in your code but it would be better to make it work exactly as version 1.

Any chance for ETA? Days? Weeks?

This is tough to answer because “weeks” could mean anywhere between 2-8 weeks and I don’t think it will be anywhere in the 4-8 week range, but if I say “days”, in particular with the weekend in the way, it would set your expectations that it could be as early Monday or Tuesday and I don’t think that’s realistic either. 

Have you tried the code above with the V1 plugin?

Rob

I don’t know why the code from the link in my previous post stopped working the last weeks but I tried your code with ver1 plugin.

Did some changes and now I’m able to open snapshots.

Trying to do the same for saving snapshots too.

–edit

Saving works too, thnx Rob!

@Rob, any idea when this will be out of Beta?
FYI, my new app has about 500 installs with no ANRs and no crashes. You and your team deserves big time kudos!

@troylyndon we announced it last week. It’s not really in beta and should be a drop-in replacement. However, there are some reports on another thread of it not working. I would invite you to give it a try and help us identify if there are problems. Just make sure to test it before making a public release.

Rob

I am using gpgs v1. My snapshot functionality used to work before now it is not working anymore. No code changes were made from my side. Only the corona version was changed. 

I have tried gpgs v2 as a drop in replacement but the login pop up doesn’t even show and I can’t see any errors also so just reverted back to v1 again. 

Currently building with 2018.3397.