守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1945|回复: 1
打印 上一主题 下一主题

亚马逊游戏圈ANE(Android )

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

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

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

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

    开源英雄守望者

    跳转到指定楼层
    楼主
    发表于 2015-2-2 16:19:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    应用下载
    应用名称: AmazonGameCircle-ANE
    支持64位:
    当前版本: 未知
    运行平台: Android 
    开发语言: ActionScript 3 JAVA 
    应用类别: ANE-JAVA
    应用简介: Amazon Game Circle Native Extension for Adobe Air. Use Amazon Game Circle in Adobe Air (Android Only)
    AmazonGameCircle Native Extension for Adobe Air

    This AmazonGameCircle ANE add supprt to using Amazon Game Circle with Adobe Air. Supports Android only.

    About Amazon Game Circle?

    https://developer.amazon.com/public/apis/engage/gamecircle

    Changelog

    1.1.0

    • add methods for request leaderboards data.
    • add methods for request achievements data.
    • add showGameCircle(), showSignInPage()

    1.0.1

    • add serviceReady to indicate the service is ready.
    Install the library

    Add the AmazonGameCircle-ANE library to your project.

    In Flash Professional CS6:

    • Create a new mobile project
    • Choose File > PublishSettings...
    • Select the wrench icon next to 'Script' for 'ActionScriptSettings'
    • Select the Library Path tab.
    • Click 'Browse for Native Extension(ANE) File' and select the Mopub.ane file.

    In Flash Builder 4.6:

    • Goto Project Properties
    • Select Native Extensions under Actionscript Build Path
    • Choose Add ANE... and navigate to the Mopub.ane file
    • Select Actionscript Build Packaging > Google Android or Apple IOS
    • Select the Native Extensions tab, and click the 'Package' check box next to the extension

    In Flash Professional CS5.5 or Lower:

    • Select File>PublishSettings>Flash>ActionScript 3.0 Settings
    • Select External Library Path
    • Click Browseto SWC File
    • Select the Mopub.swc

    In Flash Builder 4.5:

    • Goto Project Properties
    • Select Action Script Build Path
    • Select Add Swc
    • Navigate to Mopub.swc and choose External Library type

    In FlashDevelop:

    • Copy the Mopub.swc file to your project folder.
    • In the explorer panel, right click the .swc and select Add to Library.
    • Right-click the swc file in the explorer, choose Options, and select External Library
    Add the Actionscript

    Import the library


    1. import digicrafts.extensions.AmazonGameCircle;
    2.   import digicrafts.extensions.events.AmazonGameCircleEvent;
    复制代码
    Initialize.

    1. AmazonGameCircle.getInstance().addEventListener(AmazonGameCircleEvent.SERVICE_READY, handleAmazonGameCircleEvent);
    2.   AmazonGameCircle.getInstance().addEventListener(AmazonGameCircleEvent.SERVICE_NOT_READY, handleAmazonGameCircleEvent);
    3.   AmazonGameCircle.initialize();

    4.   private function handleAmazonGameCircleEvent(e:AmazonGameCircleEvent):void
    5.   {
    6.       switch (e.type){
    7.           case AmazonGameCircleEvent.SERVICE_READY:
    8.               // Game circle ready           
    9.               break;
    10.           case AmazonGameCircleEvent.SERVICE_NOT_READY:
    11.               // Game circle not ready
    12.               break;
    13.       }
    14.   }
    复制代码
    Submit Score.

    1. AmazonGameCircle.submitScore(leaderboard_id, value);

    2.   private function handleAmazonGameCircleLeaderboardEvent(e:AmazonGameCircleEvent):void
    3.   {
    4.       switch (e.type){
    5.           case AmazonGameCircleEvent.SUBMIT_SCORE_COMPLETE:

    6.               break;
    7.           case AmazonGameCircleEvent.SUBMIT_SCORE_ERROR:
    8.               break;
    9.       }
    10.   }  
    复制代码
    Show leaderboard.

    1. AmazonGameCircle.showLeaderboard(leaderboard_id);
    复制代码
    Update Achievements.

    1. AmazonGameCircle.updateAchievement(achievementId,progress);
    复制代码
    Show Achievements.

    1. AmazonGameCircle.showAchievements();
    复制代码
    Setup for AndroidUpdate Your Application DescriptorYou'll need to be using the AIR 4.0 SDK or higher, include the extension in your Application Descriptor XML, and update the Android Manifest Additions with some settings.Add the following settings before<application> tag.
    1. <uses-permission android:name="android.permission.INTERNET" />
    2. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    复制代码
    Add the following settings in <application> tag. Remember to replace your "YOUR.APP.PACKAGE.ID".
    1.   <activity android:name="com.amazon.ags.html5.overlay.GameCircleUserInterface"
    2.       android:theme="@style/GCOverlay" android:hardwareAccelerated="false"></activity>
    3.   <activity
    4.     android:name="com.amazon.identity.auth.device.authorization.AuthorizationActivity"
    5.     android:theme="@android:style/Theme.NoDisplay"
    6.     android:allowTaskReparenting="true"
    7.     android:launchMode="singleTask">
    8.     <intent-filter>
    9.        <action android:name="android.intent.action.VIEW" />
    10.        <category android:name="android.intent.category.DEFAULT" />
    11.        <category android:name="android.intent.category.BROWSABLE" />
    12.        <data android:host="YOUR.APP.PACKAGE.ID" android:scheme="amzn" />
    13.     </intent-filter>
    14.   </activity>
    15.   <activity android:name="com.amazon.ags.html5.overlay.GameCircleAlertUserInterface"
    16.   android:theme="@style/GCAlert" android:hardwareAccelerated="false"></activity>
    17.   <receiver
    18.     android:name="com.amazon.identity.auth.device.authorization.PackageIntentReceiver"
    19.     android:enabled="true">
    20.     <intent-filter>
    21.        <action android:name="android.intent.action.PACKAGE_INSTALL" />
    22.        <action android:name="android.intent.action.PACKAGE_ADDED" />
    23.        <data android:scheme="package" />
    24.     </intent-filter>
    25.   </receiver>
    复制代码
    TODO-Allow initializing with different Games Feature-Supporting WhispersyncGame we made using this ANEFlippy DayRecycle RangersDiamond SpeedyDeveloperThe software is developed by Digicrafts.http://www.facebook.com/DigicraftsComponentshttp://www.digicrafts.com.hk/componentshttp://www.html5components.comLicenseThis project is licensed under the BSD license


    相关链接:
    https://github.com/digicrafts/AmazonGameCircle-ANE

    本帖子中包含更多资源

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

    x
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
    收藏收藏 分享分享 支持支持 反对反对 微信
    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

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

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

    开源英雄守望者

    沙发
     楼主| 发表于 2015-3-27 15:31:59 | 只看该作者
    本帖最后由 破晓 于 2015-3-27 15:33 编辑

    相关下载:

    https://github.com/kptbizon/ANE-Amazon-Game-Circle
    1. <extensionID>com.mm.extensions.amazon.gamecircle</extensionID>
    复制代码
    1. <uses-sdk android:minSdkVersion="10"/>
    复制代码
    1. <uses-permission android:name="android.permission.INTERNET" />
    2. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    复制代码
    1. <activity android:name="com.amazon.ags.html5.overlay.GameCircleUserInterface"
    2. android:theme="@style/GCOverlay" android:hardwareAccelerated="false"></activity>
    3. <activity
    4.   android:name="com.amazon.identity.auth.device.authorization.AuthorizationActivity"
    5.   android:theme="@android:style/Theme.NoDisplay"
    6.   android:allowTaskReparenting="true"
    7.   android:launchMode="singleTask">
    8.   <intent-filter>
    9.      <action android:name="android.intent.action.VIEW" />
    10.      <category android:name="android.intent.category.DEFAULT" />
    11.      <category android:name="android.intent.category.BROWSABLE" />
    12.      <data android:host="YOUR_PACKAGE_NAME_HERE" android:scheme="amzn" />
    13.   </intent-filter>
    14. </activity>
    15. <activity android:name="com.amazon.ags.html5.overlay.GameCircleAlertUserInterface"
    16. android:theme="@style/GCAlert" android:hardwareAccelerated="false"></activity>
    17. <receiver
    18.   android:name="com.amazon.identity.auth.device.authorization.PackageIntentReceiver"
    19.   android:enabled="true">
    20.   <intent-filter>
    21.      <action android:name="android.intent.action.PACKAGE_INSTALL" />
    22.      <action android:name="android.intent.action.PACKAGE_ADDED" />
    23.      <data android:scheme="package" />
    24.   </intent-filter>
    25. </receiver>
    复制代码
    1. AmazonGameCircle.getInstance().initialize(this, AmazonGamesFeature.ACHIEVEMENTS | AmazonGamesFeature.LEADERBOARDS | AmazonGamesFeature.PROGRESS | AmazonGamesFeature.WHISPERSYNC);
    复制代码


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

    使用道具 举报

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

    本版积分规则

    
    关闭

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

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

    GMT+8, 2026-1-23 23:23 , Processed in 0.054276 second(s), 36 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

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