I have created one app using xamarin android native.
Now I want to display admob ads in that, both banner & interstitial.
But I did not found any step by step good tutorial.
I found few, but it was for xamarin.forms not for native.
So can any one give me link of that, OR if any one has done this kind of task then please share steps so I can integrate it.
Thanks
using Android.Gms.Ads;
...
var adView = new AdView(Context);
adView.AdUnitId = "ca-app-pub-3756076456456456/1111123234/app320x250";
adView.AdSize = new AdSize(300, 250);
// do whatever with adView, add as child, set as native control (if using ViewRenderers etc)
// OR
var interstitialAd = new InterstitialAd(Context);
interstitialAd.AdUnitId = "ca-app-pub-434343434/34343434/myinterstitial";
var requestbuilder = new AdRequest.Builder();
interstitialAd.LoadAd(requestbuilder.Build());
interstitialAd.Show();
I managed it working using below example link.
https://developer.xamarin.com/samples/monodroid/google-services/AdMobExample/
So if any one still does not get work, then you can ask me question.
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With