AndroidX icon indicating copy to clipboard operation
AndroidX copied to clipboard

Missing `PlayGames.GetSnapshotClient()` API in `Xamarin.GooglePlayServices.Games.V2`

Open pekspro opened this issue 2 years ago • 10 comments

I'm working with a game, and I have been able to use leaderboards. But I also would like to add support for saved games:

https://developers.google.com/games/services/android/savedgames

But as I understand it there is no binding for com.google.android.gms.games.snapshot. Can this be added? Please, please, please :-)

pekspro avatar Sep 11 '23 15:09 pekspro

@pekspro

Thanks for the feedback.

Seems like this artifact is not in the official repo:

https://maven.google.com/web/index.html

I found it here:

https://mvnrepository.com/artifact/com.google.android.gms/play-services-games/23.1.0

I cannot guarantee that bindings will be done in some reasonable time.

moljac avatar Sep 19 '23 07:09 moljac

I think the binding is in the official repo as a part of Play Services Games v2, in:

https://maven.google.com/web/index.html#com.google.android.gms:play-services-games-v2:19.0.0

At least, looking in the javadoc files there's documentation for it. Are the bindings automatically generated from this or do they need to be manually written? ( currently assessing the feasibility of adding some of this myself .. but still trying to figure out how things are put together in the Xamarin/.NET bindings )

stuartmilleruk avatar Dec 27 '23 17:12 stuartmilleruk

@stuartmilleruk

Thanks for the feedback

How about:

https://www.nuget.org/packages/Xamarin.GooglePlayServices.Games.V2

??

moljac avatar Dec 27 '23 19:12 moljac

@moljac thanks... sorry, this thread was mentioned in my bug xamarin/AndroidX#975 ( PlayersClient classes are missing in the xamarin gpg plugin which makes it impossible to track player changes ) and I noticed the binding that @pekspro needed was in the v2 API as you say.

@pekspro does the V2 API have all the bits you're looking for?

stuartmilleruk avatar Dec 29 '23 14:12 stuartmilleruk

@stuartmilleruk, I have tried the latest version of Xamarin.GooglePlayServices.Games.V2, and there is no PlayGames.GetSnapshotClient() that I think is needed :-(

As a side note, this nuget package works in .NET 7 projects, in .NET 8 compiling seems to fail :-(

pekspro avatar Dec 29 '23 15:12 pekspro

@stuartmilleruk @pekspro

I did preliminary quick-n-dirty analysis and the problem is in few classes in GPS.Basementwhich were not surfaced, so it is not that trivial.

I will open PR in which I will try to fix this issues (not one class is missing).

@pekspro

As a side note, this nuget package works in .NET 7 projects, in .NET 8 compiling seems to fail :-(

Please open new issue for that.

PlayGames.GetSnapshotClient() that I think is needed

It was not surfaced because return type was not surfaced.

moljac avatar Jul 27 '24 08:07 moljac

@moljac @jpobst

Given the deprecation of the Google Sign-In API, the GPS.Games v1 SDK will be removed in 2026. Starting in February 2025, new publications will only be allowed on v2.

Do you guys think we can resolve this in the near future?

MarcoCestari avatar Feb 24 '25 15:02 MarcoCestari

@MarcoCestari

Given the deprecation of the Google Sign-In API, the GPS.Games v1 SDK will be removed in 2026. Starting in February 2025, new publications will only be allowed on v2.

Do you guys think we can resolve this in the near future?

I hope so. I want to build all packages for net10.0, so other teams (MAUI) can test it. I took some time, but finding way return type was not surfaced was unclear. Then I had to switch to other tasks...

moljac avatar Feb 24 '25 15:02 moljac

@moljac, any update on this?

pekspro avatar Jul 30 '25 16:07 pekspro

Hello @moljac @jonathanpeppers, Do we have any estimate on when this will be resolved? Maybe with the release of .NET 10?

At the moment, I’m using my own binding, but that’s not ideal.

MarcoCestari avatar Oct 14 '25 00:10 MarcoCestari