VOOZH about

URL: https://www.nuget.org/packages/Soenneker.Maui.Admob/

⇱ NuGet Gallery | Soenneker.Maui.Admob 4.0.514




👁 Image
Soenneker.Maui.Admob 4.0.514

Prefix Reserved
dotnet add package Soenneker.Maui.Admob --version 4.0.514
 
 
NuGet\Install-Package Soenneker.Maui.Admob -Version 4.0.514
 
 
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="4.0.514" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Maui.Admob" Version="4.0.514" />
 
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 4.0.514
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Maui.Admob, 4.0.514"
 
 
#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@4.0.514
 
 
#: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=4.0.514
 
Install as a Cake Addin
#tool nuget:?package=Soenneker.Maui.Admob&version=4.0.514
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 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 is a .NET MAUI AdMob helper.

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);
}

Banner Sizes

Available sizes:

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

If you use Custom, also set ContentWidth and ContentHeight.

Banner Events

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.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-android36.0 net10.0-android36.0 is compatible.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-ios26.0 net10.0-ios26.0 is compatible.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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
4.0.514 0 6/19/2026
4.0.512 0 6/18/2026
4.0.511 43 6/16/2026
4.0.510 47 6/16/2026
4.0.509 100 6/13/2026
4.0.507 100 6/10/2026
4.0.505 93 6/10/2026
4.0.504 93 6/9/2026
4.0.503 107 6/6/2026
4.0.502 104 6/6/2026
4.0.500 100 6/6/2026
4.0.498 107 6/6/2026
4.0.496 93 6/5/2026
4.0.494 92 6/5/2026
4.0.491 104 6/5/2026
4.0.490 93 6/5/2026
4.0.489 106 5/21/2026
4.0.488 107 5/13/2026
4.0.487 103 5/13/2026
4.0.486 101 5/12/2026
Loading failed

Update dependency Soenneker.Extensions.Enumerable to 4.0.635 (#920)