Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android.Gms.PlayGames.GetPlayersClient and PlayersClient API Missing from Xamarin.GooglePlayServices.Games.V2 #771

Open
stuartmilleruk opened this issue May 8, 2023 · 3 comments

Comments

@stuartmilleruk
Copy link

stuartmilleruk commented May 8, 2023

Xamarin.Android Version (eg: 6.0): net7.0-android32

Operating System & Version (eg: Mac OSX 10.11): MacOS Ventura 13.1

Google Play Services Version

  • Xamarin.GooglePlayServices.Base : 118.1.0.2
  • Xamarin.GooglePlayServices.Games.V2 : 117.0.0.1

Describe your Issue

Some of the Google PlayGames V2 API appears to be missing in the nuget packages, which makes it tricky to support basic usage of the PlayGames V2 API. The main issue is that there doesn't appear to be any binding for the PlayersClient part of the API, which means there's no way of getting the players display name or any information about the currently signed in player.

My main use-case is : If a user changes their Google Play profile in the OS Settings, there doesn't seem to be a way to identify that the player that is now automatically signed in by the app with PlayGames.V2 is different or has changed... so there's no way for the app to, for example, invalidate any cached data that was in-use with a previous PlayGames user.

As an example, the Google PlayGames V2 docs show one usage that doesn't appear to be possible with Xamarin, because there's no getPlayersClient call available ( unlike, for example, the GetAchievementsClient() call which is exposed ). Having that API available would make my particular use case possible.

PlayGames.getPlayersClient(activity).getCurrentPlayer().addOnCompleteListener(mTask -> {
    // Get PlayerID with mTask.getResult().getPlayerId()
  }
);

( taken from : Play Games v2 Sign in Documentation )

Are there any plans to add this functionality, or is there a workaround that can be used to identify the user or extract this information? I'm not too familiar with the way Xamarin binds to the platform api's so haven't been able to add this functionality successfully myself yet.

@pekspro
Copy link

pekspro commented Sep 12, 2023

I'm also missing this.

@stuartmilleruk
Copy link
Author

@pekspro were you able to find a workaround for this? I'm now coming back around to this issue hoping there might have been a fix or a workaround, but there doesn't seem to have been any movement on it so far.

@jpobst If this is something we'd be able to add to the binding, then any information on how would be great. I'm not sure how the bindings are generated for the GooglePlayServicesComponent, but if it's just a case of inserting some metadata for the function somewhere and rebuilding, then it might be something I could do.

@pekspro
Copy link

pekspro commented Dec 27, 2023

@stuartmilleruk, thanks, no I did not found any workaround for this issue. A solution for this and #800 woule be highly appreciated :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants