1. Register your AdMob account number and get the ID website.
2. Download Admob sdk https://github.com/unity-plugins/Unity-Admob.
3. Import the Eclipse AdMob jar.
4. I use the 4.3.1 version, which requires SDK3.2 version of the project.properties file of the target =android-13, if not change the configuration in Androidmanifest.xml, it will be tragic.
5.using AdMob.
6.admob.instance (). Initadmob ("AdMob banner id", "AdMob interstitial id");//admob ID with Format ca-app-pub-2796046890663330/756767388.
7.admob.instance (). Showbannerrelative (Adsize.banner, Adposition.bottom_center, 0).
This sentence will give an error, because uimode to 8, 13 screen size and smallestscreensize appear. The
Code is set as follows for unity:
I'm not using the XML layout, the direct code control layout is superimposed on the top of the current layout, there are occasional ads, and clicking the Close button on the ad is turned off.
If you add in unity, you need to import the Classes.jar package and then inherit the Unityplayeractivity class. If not, inherit the activity class directly and then set the view in OnCreate.
using AdMob;
Admob.instance (). Initadmob ("AdMob banner id", "AdMob interstitial id"),//initadmob just need call once,if if Create banner, you are not need call any more
Admob.instance (). loadinterstitial ();
AdMob's Android app Add (unity,eclipse)