Add google AdMob to xamarin

Published: 20 February 2022
on channel: Ammar Sharshara
2,053
27

Steps to add AdMob

1)add Xamarin.GooglePlayServices.Ads.Lite to xamarin android

2)create admob account

3)add to androidmainfest.xml
com.google.android.gms.ads.APPLICATION_ID

4) add to androidmainfest.xml permission
"android.permission.INTERNET"
"android.permission.ACCESS_NETWORK_STATE"

6)now we have to create custom render

7)test ads : enable test device now run the project to get ads id
add this code in class MainActivity
protected override void OnCreate(Bundle savedInstanceState)
{

RequestConfiguration.Builder builder = new RequestConfiguration.Builder();
builder = builder.SetTestDeviceIds(new string[] { "you test ads id" });
MobileAds.RequestConfiguration = builder.Build();

Android.Gms.Ads.MobileAds.Initialize(ApplicationContext);


8) after run project you to wait to display test ads



https://ammarshar.blogspot.com/2022/0...


https://apps.admob.com/

https://developers.google.com/admob/a...

https://support.google.com/admob/answ...
https://docs.microsoft.com/en-us/answ...

Microsoft Visual Studio Professional 2019
#sql #microsoft #net #visualstudio
#WPF #csharp #android #xamarin #sql #sqlite


Watch video Add google AdMob to xamarin online without registration, duration hours minute second in high quality. This video was added by user Ammar Sharshara 20 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,053 once and liked it 27 people.