admob_all_in_one.ane contains admob for ios and for android in one file,very convenient
admob home: www.admob.com
project home:https://github.com/lilili87222/admob-for-flash/
download:https://github.com/lilili87222/admob-for-flash/archive/master.zip
admob ane for air mobile ad ,support Interstitial and Banner
support landscape and portrait and autoOrient
support ios and android
support all native event
base on admob ios sdk 6.12.0 and admob android sdk(Google Play services 4.5) 4.5
requred air sdk 14.0 or later
very easy to use ,just three line code for simple usage
var admob:Admob=Admob.getInstance();
admob.setKeys("a152834c2b8cce6");
admob.showBanner(Admob.BANNER,AdmobPosition.BOTTOM_CENTER);
###show admob Interstitial ad (full screen ad)
var admob:Admob=Admob.getInstance();
admob.setKeys("ca-app-pub-17380930385764784/6322941144","ca-app-pub-17380930385764874/4846207943");////replace this fake ID with your really ID
if (admob.isInterstitialReady())// check ad has cached ,if true show it
{
admob.showInterstitial();
}
else
{
admob.cacheInterstitial();
}
var extraParam:ExtraParameter=new ExtraParameter();
extraParam.isChildApp=true;
extraParam.testDeviceID="C10FA0762720A0FD0E64FE3825A8B64F";
var admob:Admob=Admob.getInstance();
admob.setKeys("a152834c2b8cce6");
admob.showBannerAbsolute(Admob.BANNER,0,100,extraParam);
###for android. you need add in application-app.xml
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<application>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>
]]></manifestAdditions>
</android>
more function
-
- handler ad event like this.
admob.addEventListener(AdmobEvent.onBannerReceive,onAdReceived);
-
- get ad size info
protected function onAdReceived(event:AdmobEvent):void
{
if(event.type==AdmobEvent.onBannerReceive){
trace(event.data.width,event.data.height);
}
}
- 3.get screen size info,old version function
admob.getScreenSize()
1.update admob sdk for ios to 6.12.0
2.add code tips document
3.add admob extra parameter that control test mode,age,location,is child app and so on.
4.refact demo code
1.update admob sdk for ios to 6.11.1
2.fix Errors/warnings on publishing Air app with admob extension using Flash Professional
1.update admob sdk ios to 6.9.3 ,update android google service sdk to the last version
2.trace the detail when load ad fail
###6.8.0 changes
1.update admob sdk ios 6.9.2 ,android google service sdk 4.3
2.add getScreenSize function for show banner absolute
###6.6.0 changes
1.support landscape and portrait and autoOrient
2.support relation position and Absolute position
3.support ios 5, ios 6, ios 7 ,and android
4.update admob sdk to last version
###6.4.1 changes
enable Interstitial admob ad
###6.3.1 changes
1.include ios and android in one file
2.enable debug and pack on pc
3.base on admob6.3 no more use udid
4.enable get ad size info and screen size info
contact:[email protected]