Hello,
Welcome to our Microsoft Q&A platform!
From this article Update your AndroidManifest.xml, add your application ID to your app's AndroidManifest.xml file by adding a <meta-data> tag with android:name="com.google.android.gms.ads.APPLICATION_ID", as shown below.
<application android:label="googleads.Android" android:theme="@style/MainTheme">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3729926965359663~5196436184"/>
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />
</application>
Update:
Install MarcTron.Admob firstly, then using test ad unit Id to test admob ads.
<controls:MTAdView x:Name="myAds" AdsId="{OnPlatform Android='ca-app-pub-3940256099942544/6300978111', iOS='ca-app-pub-3940256099942544/2934735716'}" />
If the Banners don't appear in your app, probably it's a size problem. To solve it, add this style in your ContentPage.Resources or app.xaml:
<ContentPage.Resources>
<Style TargetType="controls:MTAdView">
<Setter Property="HeightRequest">
<Setter.Value>
<x:OnIdiom Phone="50" Tablet="90" />
</Setter.Value>
</Setter>
</Style>
</ContentPage.Resources>
more detailed note that you can take a look:
https://stackoverflow.com/questions/60470603/why-admob-doesnt-appear-in-xamarin-forms
Best Regards,
Cherry Bu
---
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.