守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

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

三星广告ANE(android)SamAds

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

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

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

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

    开源英雄守望者

    发表于 2015-3-2 17:25:29 | 显示全部楼层 |阅读模式
    应用下载
    应用名称: ANESamAds
    支持64位: 不支持
    当前版本: 未知
    运行平台: Android 
    开发语言: ActionScript 3 JAVA 
    应用类别: ANE-JAVA
    应用简介: Samsung AdHub Air Native Extension
    About

    ANESamAds is an Adobe AIR native extension (ANE) for Android to show Samsung Ads.
    Supported functionality:

    • show ad;
    • hide ad;
    • show interstitial ad; (doesn't work correctly)

    I recommend to use Samsung Ads only if you was pushed (like me) to do so by Samsung and 100% Indie.

    Docs

    Please, read docs and try ANE before asking any questions.
    http://www.samsungadhub.com/help/sdk.do
    http://help.adobe.com/en_US/air/extensions/index.html

    Installation

    Extension ID: com.pozirk.ads.SamAds
    Add "SamAds.ane" and "air\SamAds\bin\SamAds.swc" to your AIR project.
    Add the following lines to your AIR Aplication-app.xml file inside <manifestAdditions> section:



    1. <font color="rgb(51, 51, 51)"><uses-permission android:name="android.permission.INTERNET"/>
    2. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    3. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    4. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    5. <application>
    6. <activity android:name="com.sec.android.ad.AdActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
    7. </application></font>
    复制代码
    Example
    1. import com.pozirk.ads.samads.SamAds;
    2. import com.pozirk.ads.samads.AdParams;
    3. import com.pozirk.ads.samads.AdEvent;

    4. ...

    5. protected var _samads:SamAds = null;

    6. ...

    7. //> initialization of Samsung Ads
    8. _samads = new SamAds();
    9. _samads.addEventListener(AdEvent.INIT_OK, onEvent);
    10. _samads.addEventListener(AdEvent.INIT_FAIL, onEvent);
    11. _samads.addEventListener(AdEvent.AD_SHOW_OK, onEvent);
    12. _samads.addEventListener(AdEvent.AD_SHOW_FAIL, onEvent);
    13. _samads.addEventListener(AdEvent.INTERSTITIAL_FAIL, onEvent);
    14. _samads.addEventListener(AdEvent.INTERSTITIAL_CLOSED, onEvent);
    15. _samads.init("BANNER_INVENTORY_ID", "INTERSTITIAL_INVENTORY_ID");

    16. ...

    17. protected function onEvent(ae:AdEvent):void
    18. {
    19.     trace(ae.type+" "+ae._data);
    20. }
    21. //<


    22. //showing 728x90 ad at the bottom center side of the screen
    23. _samads.show(AdParams.SIZE_728x90, AdParams.HALIGN_CENTER, AdParams.VALIGN_TOP);
    复制代码
    Misc


    ANE is build with AIR3.9, in order to rebuild for another version (3.8-), do the following:
    • edit "air\extension.xml" and change 3.9, in very first line, to any 3.X you need;
    • edit "build.bat" and, in the very last line, change path from AIR3.9 SDK to any AIR3.X SDK you need;
    • execute "build.bat" to repack the ANE.









    相关链接:

    https://github.com/pozirk/ANESamAds


    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

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

    使用道具 举报

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

    本版积分规则

    
    关闭

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

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

    GMT+8, 2020-6-6 03:34 , Processed in 0.061816 second(s), 40 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

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