Soenneker.Maui.Admob 11.0.613

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Maui.Admob

Soenneker.Maui.Admob provides an Android BannerAd control and an iOS AdMob service for .NET MAUI applications.

Install

dotnet add package Soenneker.Maui.Admob

1. Register the package

This is the same pattern used by the demo:

using Microsoft.Extensions.Configuration;
using Soenneker.Maui.Admob.Registrars;

var builder = MauiApp.CreateBuilder();

#if ANDROID
builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
{
    ["AdMob:TestMode"] = "true"
});

builder.AddAdMobService();
#endif

If you are not using test mode, configure:

  • AdMob:TestMode
  • AdMob:BannerUnitId
  • AdMob:TestDevices

2. Add the Android AdMob app id

In Platforms/Android/AndroidManifest.xml:

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-3940256099942544~3347511713" />

That is Google's test app id. Replace it with your own app id for production.

3. Add a banner host to your page

<Grid x:Name="BannerHost" MinimumHeightRequest="60" />

4. Create the banner in C#

This matches the demo approach:

private void InitializeBanner()
{
    var banner = new BannerAd
    {
        Size = Enums.AdmobAdSize.Banner
    };

    banner.OnLoaded += (_, _) =>
    {
        StatusLabel.Text = "Banner loaded successfully.";
    };

    banner.OnFailedToLoad += (_, problem) =>
    {
        StatusLabel.Text = $"Banner failed to load: {problem.Title}";
    };

    BannerHost.Children.Add(banner);
}

Available sizes:

  • Banner
  • LargeBanner
  • MediumRectangle
  • FullBanner
  • Leaderboard
  • AdaptiveBanner
  • Custom

If you use Custom, also set ContentWidth and ContentHeight.

For AdaptiveBanner, set ContentWidth to the available width in device-independent pixels. When it is omitted, the Android handler uses the current display width.

Set the size and custom dimensions before adding the control to the visual tree.

BannerAd exposes:

  • OnLoaded
  • OnFailedToLoad
  • OnImpression
  • OnClicked
  • OnSwiped
  • OnOpened
  • OnClosed

Blazor Hybrid

If you are using a MAUI Blazor Hybrid app, you may also want Soenneker.Maui.Blazor.Bridge. It may help you use this library from Blazor code.

Demo

There is a demo app here:

test/Soenneker.Maui.Admob.Demo

It shows the entire Android banner flow:

  • registers AddAdMobService()
  • enables AdMob test mode
  • adds the Android AdMob app id
  • creates and displays a BannerAd
  • shows banner load/click/impression status

It uses Google's test ids, so it is safe to run as-is.

Platform behavior

  • Android registers the BannerAd handler and IAdMobServiceUtil initialization service.
  • iOS registers IAdMobService for banner, interstitial, and rewarded ads. The BannerAd control itself is Android-only.
  • Other targets do not register an AdMob service; resolving IAdMobService will fail instead of returning a null service.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible.  net11.0-android37.0 is compatible.  net11.0-ios27.2 is compatible. 
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
11.0.613 49 11/14/2026
11.0.612 59 11/12/2026
11.0.611 57 11/11/2026
11.0.610 46 11/11/2026
11.0.608 63 11/11/2026
11.0.607 69 11/10/2026
11.0.605 111 11/4/2026
11.0.604 98 10/28/2026
11.0.603 68 10/27/2026
11.0.602 64 10/26/2026
11.0.601 71 10/26/2026
11.0.600 69 10/26/2026
4.0.599 107 10/21/2026
4.0.598 122 10/14/2026
4.0.597 98 10/14/2026
4.0.596 99 10/14/2026
4.0.595 92 10/14/2026
4.0.592 104 10/14/2026
4.0.591 99 10/14/2026
4.0.590 103 10/14/2026
Loading failed

Update dependency Soenneker.Gen.EnumValues to 11.0.67 (#1247)