守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1307|回复: 0

管理网络广告ANE(admob ,iad,chartboost,baidu and inmobi )

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    51792
    钢镚
    1422

    开源英雄守望者

    发表于 2015-4-9 10:48:52 | 显示全部楼层 |阅读模式
    应用下载
    应用名称: as3-air-ad-network-framework
    支持64位: 支持
    当前版本: 未知
    运行平台: Android IOS 其他 
    开发语言: ActionScript 3 JAVA Object-C 其他 
    应用类别: ANE-多平台
    应用简介: A flash lib to manage variety of ad networks advertising in flash air mobile applications run on ios and android,like admob ,iad,chartboost and inmobi ,simple like adwhil but not need server.just need download admob ane ,iad ane,inmobi ane and chatboost ane and other ane with several line as3 code.enjoy it aser
    as3-air-ad-network-framework

    project home:https://github.com/lilili87222/as3-air-ad-network-framework
    adwhirl for actionscript ?yes ,it do as adwhirl,but more simple and not need server
    with this lib, flash developer will been able to add a variety of ad networks advertising in mobile applications quickly and easily,
    manage,switching and set rate of each advertising platform no more than 10 line actionscript code
    Library comes with support for admob ( ios, android), inmobi (ios, android), chartboost (ios, android), iad (ios) 4 ad platforms now
    air Developers can choose any numbers of platform used in a mobile application, or write your own advertising platform plugin extension

    Usage1.download

    compiled platforms.swc or checkout the source, add to flash to flex mobile project project path

    2.Use the built-in support for the platform

    download the corresponding platforms ane, and add it to flash native extension library path. following admob and inmobi to use in an application as an example

    • config ad platforms you would like to add in air application , AdItem(platform ,rate , appid, signKey,maxInterstitialShowChount) (admob recommended no more than 5 )
      1. var list: Vector <AdItem> = new Vector <AdItem> ();
      2. list.push (new AdItem (new AdmobAdapter (), 10, "admob app id", "", 5));
      3. list.push (new AdItem (new InmobiAdapter (), 10, "inmobi app id"));
      4. AdManager.getInstance () configPlatforms (list);
      复制代码

    • show Interstitial , showInterstitialOrCache() will detects weather already loaded success, if loaded success will show it ,else loaded automatically ,wait for the next calling,If loading fails , it will automatically switch to the next platform to try to load.
      1. AdManager.getInstance().showInterstitialOrCache();
      复制代码

    • display banner ads , banner ads can displayed by setting an absolute position , if advertising fails to load , it will automatically try the next platform .
      1. AdManager.getInstance().showBannerAbsolute(AdSize.PHONE_PORTRAIT, x, y);
      复制代码

    • can also set a relative position , it convenientable for android .
      1. AdManager.getInstance () showBanner (AdSize.PHONE_PORTRAIT,AdPosition.BOTTOM_CENTER);
      复制代码

    • if you use banner in applications , you must tested each banner platform, because a slight difference between the various platforms , such iad banner is 66 pixel height , admob is 50 pixels height.
    • for more function such as events, show ,hidden , support detect you can ref to demo project code
      3.write your own extensions

      if you do not use the built-in extensions , check out the source code , and then create a adapter for your own extension,??According to support Banner, Interstitial, or MorePage, to impliments the corresponding interface IBanner, IInterstitial or IMorePage. Implementation of specific interfaces can refer AdmobAdapter.as source

      4.android permission

      to use this in android air application need to configure the network permission in the xxx-app.xml

      1. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
      2. <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
      3. <uses-permission android:name="android.permission.INTERNET"/>
      复制代码
      Supported Platformsadmob
      • Download : https://github.com/lilili87222/admob-for-flash
      • Supported Platforms : ios, android
      • Supported types of ads : Banner, Interstitial
      • ExtensionID: so.cuo.platform.admob
      • Other notes : android need to add the corresponding activity
        1. <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        2. <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
        复制代码

      inmobi
      • Download : https://github.com/lilili87222/inmobi-ad-adobe-native-extention
      • Supported Platforms : ios, android
      • Supported types of ads : Banner, Interstitial
      • ExtensionID: so.cuo.platform.inmobi
      • Other notes : android need to add the corresponding activity
        1. <activity android:name="com.inmobi.androidsdk.IMBrowserActivity" android:configChanges="keyboardHidden|orientation|keyboard|smallestScreenSize|screenSize" android:hardwareAccelerated="true" /><br/>
        复制代码

      chartboost
      IAd
      baidu
      • Download :https://github.com/lilili87222/baidu-ane-for-ios-and-android
      • Supported Platforms : ios,android
      • Support Ad Type : Banner, Interstitial
      • ExtensionID: so.cuo.platform.baidu
        Other notes : android need to add the corresponding activity
        1.     <uses-permission android:name="android.permission.INTERNET"/>
        2.         <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        3.         <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
        4.         <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        5.         <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
        6.         <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
        7.     <application>
        8.         <meta-data android:name="BaiduMobAd_APP_ID" android:value="debug" />
        9.         <meta-data android:name="BaiduMobAd_APP_SEC" android:value="debug" />
        10.          <activity android:name="com.baidu.mobads.AppActivity" android:configChanges="keyboard|keyboardHidden|orientation"/>
        11.         </application>
        复制代码
        if user like this lib,you can download and review our game
        https://itunes.apple.com/us/artist/phonegame/id553087275?mt=8
        donate and download more ane
        http://www.cuo.so/ane-list/index.html




      相关链接:


      https://github.com/lilili87222/as3-air-ad-network-framework


      下载

      百度云下载

    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2019-11-21 12:14 , Processed in 0.046104 second(s), 38 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表