While working on our app Braino Challenge , we decided to use Xamarin forms all the way.
One of the cool things when using Xamarin, is the huge amount of nuget packages available, but xamarin forms stills lacks some useful plugins. For example, in our journey to forms, we had to develop a plugin to serve admob ads. The ios nuget package exists, the android one exists too, but what was missing when we started the project was a working abstraction usable in forms with respective implementations.
How to use it ?
First, download the nuget package we published.
Then initialise the plugin in your AppDelegate.cs for iOS of MainActivity for android.
//Register AdBanner Control Renderer AdBannerRenderer.Init (); //Initialize Interstitial Manager with a Specific AdMob Key CrossAdmobManager.Init (Strings.AdMobKey);
To display an interstitial, all you have to do is :
await CrossAdmobManager.Current.Show ();
To display a banner view, all you have to do is :
var myBanner = new AdBanner(); //Set Your AdMob Key myBanner.AdID = Strings.AdMobKey;
What’s next ?
We are currently preparing release both on github and nuget for several plugins we developed for Braino Challenge, so stay tuned !