Android.Gms.PlayGames.GetPlayersClient and PlayersClient API Missing from Xamarin.GooglePlayServices.Games.V2
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.