Kickstarter - KONE Coffee Filter Brewing System
and backed.
|
1 month ago
| Notes: 1228
1 month ago
I looked high and low for the admob 6 binding for mono droid and I stumbled upon an article from Greg Shackles. In his example he shows you you can combing the JavaLibrary and a JavaSource file using JNI calls to easily integrate ads. However he was using an older AdMob Java Library and I wanted to use the latest and greatest. I posted on the Xamarin news letter and people had some good ideas so I decided to create a git out of it.
Alright so what this did is basically make a bunch of static methods that we can pass a view into which we can then call the jar with. New up is to create our C# helper. So create “AdMobHelper.cs”. Inside of here we just have 2 methods as well.
This is pretty straight forward as this static class is what we will call. Next up is to setup the manifest file. So open up AndroidManifext.xml. It is important that we have the TargetSdkVersion set to 13!! You will want to add this: And also the INTERNET and ACCESS_NETWORK_STATE permissions. Lastly simply open up you .axml layout file and add the namespace: xmlns:ads=”http://schemas.android.com/apk/lib/com.google.ads” then add the actual adview: You MUST update the adUnitID!!!! This is very very important!!!! and boom here you have it. ![]() for more check out my git: https://github.com/jamesmontemagno/MonoDroid-Admob6 |