ExzileGames.AndroidPlayGamesBridge 1.0.25

dotnet add package ExzileGames.AndroidPlayGamesBridge --version 1.0.25
                    
NuGet\Install-Package ExzileGames.AndroidPlayGamesBridge -Version 1.0.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExzileGames.AndroidPlayGamesBridge" Version="1.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExzileGames.AndroidPlayGamesBridge" Version="1.0.25" />
                    
Directory.Packages.props
<PackageReference Include="ExzileGames.AndroidPlayGamesBridge" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ExzileGames.AndroidPlayGamesBridge --version 1.0.25
                    
#r "nuget: ExzileGames.AndroidPlayGamesBridge, 1.0.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ExzileGames.AndroidPlayGamesBridge@1.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ExzileGames.AndroidPlayGamesBridge&version=1.0.25
                    
Install as a Cake Addin
#tool nuget:?package=ExzileGames.AndroidPlayGamesBridge&version=1.0.25
                    
Install as a Cake Tool

AndroidPlayGamesBridge

A Java bridge + C# interop library that exposes Google Play Games Services v2 APIs missing from the Xamarin.GooglePlayServices.Games.V2 NuGet binding for .NET Android.

Problem

The Xamarin.GooglePlayServices.Games.V2 NuGet package is missing several key PGS v2 APIs:

These APIs exist in the Java AAR but the .NET binding generator excluded them. Creating linker descriptors does not help — the managed types were never generated.

Solution

This library provides a Java bridge class compiled directly into your Android project. The Java class calls the native PGS v2 APIs, and C# code communicates with it via auto-generated JNI bindings. No custom binding library or AAR manipulation needed.

APIs Exposed

API Methods Status in NuGet
Sign-In SignInAsync(bool silent) Partially available
Players GetCurrentPlayerAsync (ID, display name, avatar URIs) Missing
Snapshots LoadSnapshotAsync, SaveSnapshotAsync, DeleteSnapshotAsync Missing
Leaderboards SubmitScoreAsync, ShowLeaderboard, ShowAllLeaderboards Missing
Achievements UnlockAchievementAsync, IncrementAchievementAsync, RevealAchievementAsync, ShowAchievements Missing
Events IncrementEvent, LoadEventsAsync Missing
Player Stats GetPlayerStatsAsync (session length, churn, spend percentiles) Missing

Setup

1. Add NuGet package

dotnet add package ExzileGames.AndroidPlayGamesBridge

2. Initialize in your Activity

using AndroidPlayGamesBridge.Interop;

protected override void OnCreate(Bundle? savedInstanceState)
{
    base.OnCreate(savedInstanceState);

    var bridge = new AndroidPlayGamesBridgeImpl(this);
    PlayGamesBridgeManager.SetImplementation(bridge);
}

3. Use from shared code

using AndroidPlayGamesBridge.Interop;

// Sign in (silent first, fall back to interactive)
var signIn = await PlayGamesBridgeManager.SignInAsync(silent: true);
if (!signIn.Success)
    signIn = await PlayGamesBridgeManager.SignInAsync(silent: false);

// Get player info
var player = await PlayGamesBridgeManager.GetCurrentPlayerAsync();
if (player.Success)
    Console.WriteLine($"Hello {player.DisplayName} ({player.PlayerId})");

// Cloud save
await PlayGamesBridgeManager.SaveSnapshotAsync("save_slot_1", jsonData, "Auto-save");
var load = await PlayGamesBridgeManager.LoadSnapshotAsync("save_slot_1");
if (load.Success)
    Console.WriteLine(load.Data);

// Leaderboards
await PlayGamesBridgeManager.SubmitScoreAsync("leaderboard_id", 9001);
PlayGamesBridgeManager.ShowAllLeaderboards();

// Achievements
await PlayGamesBridgeManager.UnlockAchievementAsync("achievement_id");
PlayGamesBridgeManager.ShowAchievements();

Architecture

Your Android Project
  └── references ExzileGames.AndroidPlayGamesBridge (NuGet)
        ├── Java/PlayGamesBridge.java          ← compiled by Android build; calls PGS v2 Java APIs
        ├── Interop/IPlayGamesBridge.cs        ← platform-agnostic interface
        ├── Interop/PlayGamesBridgeManager.cs  ← static access point
        └── Interop/AndroidPlayGamesBridgeImpl.cs  ← C# wrapper calling Java via JNI

Requirements

  • .NET 9+ / .NET 10+
  • Xamarin.GooglePlayServices.Games.V2 NuGet package
  • Android API 23+
  • Google Play Games Services enabled in Google Play Console

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.25 107 4/9/2026
1.0.24 104 4/9/2026
1.0.19 93 4/9/2026
1.0.18 100 4/9/2026
1.0.17 97 4/9/2026
1.0.12 103 4/9/2026
1.0.11 101 4/8/2026
1.0.10 122 3/29/2026
1.0.0 110 3/27/2026