ExzileGames.AndroidBillingBridge 1.0.25

dotnet add package ExzileGames.AndroidBillingBridge --version 1.0.25
                    
NuGet\Install-Package ExzileGames.AndroidBillingBridge -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.AndroidBillingBridge" Version="1.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExzileGames.AndroidBillingBridge" Version="1.0.25" />
                    
Directory.Packages.props
<PackageReference Include="ExzileGames.AndroidBillingBridge" />
                    
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.AndroidBillingBridge --version 1.0.25
                    
#r "nuget: ExzileGames.AndroidBillingBridge, 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.AndroidBillingBridge@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.AndroidBillingBridge&version=1.0.25
                    
Install as a Cake Addin
#tool nuget:?package=ExzileGames.AndroidBillingBridge&version=1.0.25
                    
Install as a Cake Tool

AndroidBillingBridge

A Java bridge + C# interop library for Google Play Billing Library v8 on .NET Android. Provides direct access to the full Billing API without reflection hacks or incomplete NuGet bindings.

Problem

The Xamarin.Android.Google.BillingClient NuGet binding has issues with certain API surfaces — missing method overloads, parameter type inconsistencies, and types that require reflection to invoke. This forces developers to write fragile reflection-based code to call basic operations like ConsumeAsync and QueryProductDetailsAsync.

Solution

This library compiles a Java bridge class directly into your Android project. The Java class calls the Billing Library APIs natively, and C# communicates via auto-generated JNI bindings. No reflection needed.

APIs Exposed

API Methods
Connection ConnectAsync, Disconnect, GetConnectionState
Product Details QueryInAppProductsAsync, QuerySubscriptionsAsync
Purchase Flow LaunchPurchaseFlow, LaunchPurchaseFlowWithOffer, SetPurchaseListener
Consume ConsumeAsync
Acknowledge AcknowledgeAsync
Query Purchases QueryInAppPurchasesAsync, QuerySubscriptionPurchasesAsync
Purchase History QueryInAppPurchaseHistoryAsync, QuerySubscriptionPurchaseHistoryAsync
In-App Messages ShowInAppMessages (price changes, subscription status)

Setup

1. Add NuGet package

dotnet add package ExzileGames.AndroidBillingBridge

2. Initialize in your Activity

using AndroidBillingBridge.Interop;

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

    var billing = new AndroidBillingBridgeImpl(this);
    BillingBridgeManager.SetImplementation(billing);
}

3. Use from shared code

using AndroidBillingBridge.Interop;

// Connect to the billing service
var conn = await BillingBridgeManager.ConnectAsync();

// Query products (returns real prices from Google Play)
var products = await BillingBridgeManager.QueryInAppProductsAsync(
    ["redchest500", "redchest2000"]);

if (products.Success)
{
    foreach (var p in products.Products!)
        Console.WriteLine($"{p.Name}: {p.OneTimePurchaseOfferDetails?.FormattedPrice}");
}

// Listen for purchase results
BillingBridgeManager.SetPurchaseListener(result =>
{
    if (result.ResponseCode == 0 && result.Purchases != null)
    {
        foreach (var purchase in result.Purchases)
            _ = BillingBridgeManager.ConsumeAsync(purchase.PurchaseToken);
    }
});

// Launch purchase flow
BillingBridgeManager.LaunchPurchaseFlow("redchest500");

// Restore purchases
var existing = await BillingBridgeManager.QueryInAppPurchasesAsync();

What This Replaces

// BEFORE: reflection hacks required by the raw binding
var method = billingClient.GetType().GetMethods()
    .Where(m => m.Name == "ConsumeAsync" || m.Name == "Consume")...
method.Invoke(billingClient, args);

// AFTER: direct bridge call
var result = await BillingBridgeManager.ConsumeAsync(purchaseToken);

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 172 4/9/2026
1.0.24 97 4/9/2026
1.0.19 94 4/9/2026
1.0.18 94 4/9/2026
1.0.17 96 4/9/2026
1.0.12 96 4/9/2026
1.0.11 105 4/8/2026
1.0.10 127 3/29/2026
1.0.0 109 3/27/2026