ExzileGames.AndroidAdsBridge 1.0.25

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

AndroidAdsBridge

A Java bridge + C# interop library for Google Mobile Ads (AdMob) on .NET Android. Supports rewarded, interstitial, rewarded interstitial, app open, and banner ad formats with a clean async C# API.

Problem

The Xamarin.GooglePlayServices.Ads NuGet binding wraps the AdMob SDK but exposes a callback-heavy Java API that is cumbersome to use from C#. Loading an ad, waiting for it to be ready, showing it, and receiving the result requires wiring up multiple Java listener interfaces by hand. Banner ad lifecycle (show/hide/destroy) is especially fragile when done through the raw binding.

Solution

This library compiles Java bridge classes directly into your Android project — one per ad format. Each bridge manages the listener lifecycle internally and exposes a clean async C# API via auto-generated JNI bindings. No manual listener wiring, no reflection.

APIs Exposed

Format Methods
Rewarded LoadRewardedAd, IsRewardedAdAvailable, ShowRewardedAdAsync
Interstitial LoadInterstitialAd, IsInterstitialAdAvailable, ShowInterstitialAdAsync
Rewarded Interstitial LoadRewardedInterstitialAd, IsRewardedInterstitialAdAvailable, ShowRewardedInterstitialAdAsync
App Open LoadAppOpenAd, IsAppOpenAdAvailable, ShowAppOpenAdAsync
Banner ShowBannerAd, HideBannerAd, RevealBannerAd, DestroyBannerAd

Setup

1. Add NuGet package

dotnet add package ExzileGames.AndroidAdsBridge

2. Initialize in your Activity

using AndroidAdsBridge.Interop;

protected override void OnCreate(Bundle? savedInstanceState)
{
    base.OnCreate(savedInstanceState);
    AdsBridgeManager.SetImplementation(new AndroidAdsBridgeImpl(this));
}

3. Use from shared code

using AndroidAdsBridge.Interop;

// --- Rewarded ads ---
// Load (call early, e.g. at level start)
AdsBridgeManager.LoadRewardedAd("ca-app-pub-xxx/yyy");

// Show when ready
if (AdsBridgeManager.IsRewardedAdAvailable)
{
    var result = await AdsBridgeManager.ShowRewardedAdAsync();
    if (result.RewardEarned)
        GrantReward();
}

// --- Interstitial ads ---
AdsBridgeManager.LoadInterstitialAd("ca-app-pub-xxx/yyy");

if (AdsBridgeManager.IsInterstitialAdAvailable)
    await AdsBridgeManager.ShowInterstitialAdAsync();

// --- Banner ads ---
AdsBridgeManager.ShowBannerAd("ca-app-pub-xxx/yyy", BannerPosition.Bottom);
AdsBridgeManager.HideBannerAd();   // hide temporarily
AdsBridgeManager.RevealBannerAd(); // show again
AdsBridgeManager.DestroyBannerAd(); // remove permanently

Notes

  • Call LoadXxxAd before ShowXxxAdAsync — show fails immediately if no ad is loaded.
  • ShowRewardedAdAsync and ShowRewardedInterstitialAdAsync accept an optional CancellationToken.
  • Consent must be collected via AndroidConsentBridge before initializing or loading any ads.

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 171 4/9/2026
1.0.24 97 4/9/2026
1.0.19 85 4/9/2026
1.0.18 91 4/9/2026
1.0.17 90 4/9/2026
1.0.12 96 4/9/2026