Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Google Play Games Services v2 (plugin beta)
Started by genelixis Sep 01 2018 09:03 AM

16 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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?

 


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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



[TOPIC: post.html]
#3

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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 :)

 

Also sample link is not working.

That would help everybody, a lot!!



[TOPIC: post.html]
#4

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 507 posts
  • Corona SDK

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

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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



[TOPIC: post.html]
#6

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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?



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

We haven't touched the V1 plugin.

 

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

 

Rob



[TOPIC: post.html]
#8

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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?



[TOPIC: post.html]
#9

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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.



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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

 

Rob



[TOPIC: post.html]
#11

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

Any news related to gpgs version 2 plugin?



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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



[TOPIC: post.html]
#13

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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!



[TOPIC: post.html]
#14

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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



[TOPIC: post.html]
#15

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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?



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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



[TOPIC: post.html]
#17

genelixis

[GLOBAL: userInfoPane.html]
genelixis
  • Enthusiast

  • 38 posts
  • Corona SDK

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!




[topic_controls]
[/topic_controls]