1) I have downloaded "admob for flash air (admob_all_in_one6.6.7.ane) from this link http://fuji.h1de.net/browse.php?u=Oi...zLw%3D%3D&b=13
2) I added this native extension to my flash cs6 project via advanced actionscript 3 settings -> library path tab.
3) Set my flash target to the air 4.0.01390 for android.
4) I wrote a small class to inialize add....
Expand|Select|Wrap|Line Numbers
- package
- {
- import flash.display.Sprite;
- import so.cuo.platform.admob.Admob;
- import so.cuo.platform.admob.AdmobEvent;
- public class Interstitial extends Sprite
- {
- var admob:Admob= Admob.getInstance();
- public function Interstitial()
- {
- super();
- }
- public function displayAdd():void
- {
- if(admob.supportDevice)
- {
- // i have replaced setKeys with my admob ad unit id "ca-app-pub-xxxxxxxxxxx/xxxxxxxxxxx"
- admob.setKeys("a152834c8723912");
- admob.addEventListener(AdmobEvent.onInterstitialReceive,onAdReceived);
- admob.cacheInterstitial();
- }
- }
- protected function onAdReceived(event:AdmobEvent):void
- {
- if(event.type==AdmobEvent.onInterstitialReceive){
- admob.showInterstitial();
- }
- }
- }
Expand|Select|Wrap|Line Numbers
- var showAdd:Interstitial = new Interstitial();
- showAdd.displayAdd();
Expand|Select|Wrap|Line Numbers
- <android>
- <manifestAdditions>
- <![CDATA[<manifest>
- <uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
- <application>
- <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
- </application>
- </manifest>]]>
- </manifestAdditions>
- </android>
- <extensions>
- <extensionID>so.cuo.platform.admob</extensionID>
- </extensions>
8) no ads display, my app just crashes and de-activates when i call
Expand|Select|Wrap|Line Numbers
- var showAdd:Interstitial = new Interstitial();
- showAdd.displayAdd();