2016年2月18日星期四

Google Admob Air Native Extension IOS

admob ane for flash air iOS app and actionscript android app.include banner and Interstitial native Advertising.<br/>
this Admob ANE suport admob 1 and admob 2,not using uuid.using the last sdk.
admob ane for air mobile ad ,support Interstitial and Banner<br/>
support  landscape and portrait  and autoOrient<br/>
support ios and android<br/>
support all native event<br/>
support ios 64,air sdk 16 <br/>
support ios 9<br/>
base on admob ios sdk 7.6.0 and admob android sdk(Google Play services 8.1) 8.1<br/>
requred  air sdk 20.0 or later <br/>


very easy to use ,just three line code for simple usage<br/>

### show simple admob banner :
```
var admob:Admob=Admob.getInstance();
admob.setKeys("your admob banner id","your admob institial id");
admob.showBanner(Admob.BANNER,AdmobPosition.BOTTOM_CENTER);
```

###show admob  Interstitial ad (full screen ad)
```
var admob:Admob=Admob.getInstance();
admob.setKeys("your admob banner id","your admob institial id");////replace this fake ID with your really ID
if (admob.isInterstitialReady())// check ad has cached ,if true show it
{
     admob.showInterstitial();
}
else
{
    admob.cacheInterstitial();
}
```
### show test ad banner with extra parameter
```
var extraParam:ExtraParameter=new ExtraParameter();
//extraParam.isChildApp=true;
extraParam.testDeviceID="true";// for android
//extraParam.testDeviceID="your device"; for ios 

var admob:Admob=Admob.getInstance();
admob.setKeys("your admob banner id","your admob institial id");
admob.showBannerAbsolute(Admob.SMART_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.INTERNET"/>
   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_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" android:theme="@android:style/Theme.Translucent"/>
    </application>
</manifest>
]]></manifestAdditions>
    </android>
```

**more function**
- 1. handler  ad event  like this.
```
admob.addEventListener(AdmobEvent.onBannerReceive,onAdReceived);
```
- 2. 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()

```
project home:https://github.com/lilili87222/admob-for-flash/ <br />


1 条评论:

  1. Do you understand there's a 12 word sentence you can say to your partner... that will trigger intense emotions of love and instinctual appeal for you deep inside his heart?

    Because deep inside these 12 words is a "secret signal" that fuels a man's instinct to love, idolize and care for you with all his heart...

    12 Words That Trigger A Man's Love Response

    This instinct is so hardwired into a man's brain that it will drive him to work better than ever before to take care of you.

    As a matter of fact, triggering this dominant instinct is absolutely essential to having the best possible relationship with your man that the instance you send your man one of the "Secret Signals"...

    ...You will instantly find him expose his heart and mind to you in such a way he never experienced before and he'll identify you as the only woman in the galaxy who has ever truly appealed to him.

    回复删除