Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admob on MAUI #1083

Open
OMendozaG opened this issue Jan 29, 2025 · 1 comment
Open

Admob on MAUI #1083

OMendozaG opened this issue Jan 29, 2025 · 1 comment

Comments

@OMendozaG
Copy link

OMendozaG commented Jan 29, 2025

Android framework version

net9.0-android

Affected platform version

Lastest

Description

Hello,

Until now, I have been developing in Xamarin and have been able to use AdMob without any issues officially because Microsoft published the binding libraries packages through NuGet:

For iOS:

Xamarin.Google.iOS.MobileAds
Xamarin.Google.iOS.UserMessagingPlatform
From: https://github.com/xamarin/GoogleApisForiOSComponents (archived repository, with no alternative). The last SDK version available is 8.12.0, while the current version is 11.13.0, and it does not work in .NET 9 MAUI projects.

For Android:

Xamarin.GooglePlayServices.Ads
Xamarin.Google.UserMessagingPlatform
From: https://github.com/dotnet/android-libraries.
Latest SDK version 23.6.0, but it does not work correctly:
#973 → Missing classes and others are unusable due to errors in metadata.xml, such as InterstitialAdLoadCallback.OnAdLoaded.
I believe too much time has passed since MAUI’s release for this to still be non-functional.

Currently, I don’t see a way to use AdMob in MAUI.

Creating the binding library myself is impossible, considering that there is not even a .NET binding library for iOS, only for Xamarin.
Moreover, integrating AARs and correctly setting up the metadata is an incredibly complex and time-consuming task.

Installing external libraries from unknown sources, which are also incomplete (they do not implement all calls and lack UserMessagingPlatform), such as MauiMTAdmob, does not seem like a reasonable option to me.

So, my question is:
Will there be official and proper support for the AdMob SDK?

For me, this would be a sad ending for MAUI, and it would be a shame because it has improved significantly over Xamarin.
It works great, and .NET 9 is amazing.

Am I missing something? Is there an official or native way to integrate AdMob?
I kindly ask for your help or an official statement from Microsoft on this matter, as I have not been able to find any information.

Thank you.

Steps to Reproduce

Try to use admob on any project..

Did you find any workaround?

No response

Relevant log output

@moljac
Copy link
Contributor

moljac commented Feb 1, 2025

#973 → Missing classes and others are unusable due to errors in metadata.xml,

Which errors in metadata.xml?

See my comment on issue you referenced:

#973 (comment)

such as InterstitialAdLoadCallback.OnAdLoaded.

This is not error.

I believe too much time has passed since MAUI’s release for this to still be non-functional.

GPS bindings are not part of MAUI. In most cases it is my/our goodwill to bind something new.

Currently, I don’t see a way to use AdMob in MAUI.

Seems like some people use AdMob with MAUI

https://www.mauiexpert.it/admob-for-maui-made-easy/

Creating the binding library myself is impossible, considering that there is not even a .NET binding library for iOS, only for Xamarin. Moreover, integrating AARs and correctly setting up the metadata is an incredibly complex and time-consuming task.

Believe me I/we know that.

Regarding iOS bindings - this is Android related repo.

Installing external libraries from unknown sources, which are also incomplete (they do not implement all calls and lack UserMessagingPlatform), such as MauiMTAdmob, does not seem like a reasonable option to me.

Because of shortage of resource[s] implementing and maintainig plugins as official suppor does not seem like reasonable option to me/us.

So, my question is: Will there be official and proper support for the AdMob SDK?

I am afraid - no.

For me, this would be a sad ending for MAUI, and it would be a shame because it has improved significantly over Xamarin. It works great, and .NET 9 is amazing.

Thanks.

Am I missing something? Is there an official or native way to integrate AdMob?

I am not SDK API expert. There is 700+ Maven artifacts maintained by us. It is almost impossible to know details about all of them.

I kindly ask for your help or an official statement from Microsoft on this matter, as I have not been able to find any information.

This was not official statement, but my personal view and gut-feeling.

I did check bindings for AdMob and cleaned up a bit. Waiting for builds to see API diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants