- 积分
- 136401
- 注册时间
- 2014-12-27
- 最后登录
- 2026-1-23
- 在线时间
- 605 小时
- 威望
- 562
- 贡献
- 29
- 金币
- 52903
- 钢镚
- 1422
- 交易凭证
- 1
- 分享
- 0
- 精华
- 33
- 帖子
- 2094
- 主题
- 1742
TA的每日心情 | 擦汗 2018-4-10 15:18 |
|---|
签到天数: 447 天 [LV.9]以坛为家II
超级版主
    
- 威望
- 562
- 贡献
- 29
- 金币
- 52903
- 钢镚
- 1422
 
|
应用下载
| 应用名称: |
ANELicenseChecker |
| 支持64位: |
|
| 当前版本: |
未知 |
| 运行平台: |
Android |
| 开发语言: |
ActionScript 3 JAVA |
| 应用类别: |
ANE-JAVA |
| 应用简介: |
ANE for App License Check |
# AboutApplication Licensing is an Adobe AIR native extension (ANE) for Android that works with Google Play and Samsung Apps (Zirconia).It provides preventive measures against illegal distribution of your app.# Docshttp://help.adobe.com/en_US/air/extensions/index.htmlhttp://developer.android.com/google/play/licensing/index.htmlhttp://developer.samsung.com/android/technical-docs/How-to-protect-your-app-from-illegal-copy-using-Samsung-Application-License-Management-Zirconia# InstallationExtension ID: com.pozirk.LicenseCheckerFor Google Play: add "LicenseChecker.ane" and "air\LicenseChecker\bin\LicenseChecker.swc" to your AIR projectFor Samsung Apps: add "SAMLicenseChecker.ane" and "air\LicenseChecker\bin\LicenseChecker.swc" to your AIR projectAdd the following lines to your AIR Aplication-app.xml file inside <manifestAdditions> section:For Google Play:- <uses-permission android:name="com.android.vending.CHECK_LICENSE" />
复制代码 For Samsung Apps:- <uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
复制代码 # Example for Google Play- import com.pozirk.license.android.LicenseChecker;
- import com.pozirk.license.android.LicenseCheckerEvent;
- //> initialization
- try
- {
- _checker = new LicenseChecker();
- _checker.addEventListener(LicenseCheckerEvent.LICENSED, onLicensed);
- _checker.addEventListener(LicenseCheckerEvent.NOT_LICENSED, onNotLicensed);
- _checker.addEventListener(LicenseCheckerEvent.APPLICATION_ERROR, onAppError);
- }
- catch(err:Error)
- {
- ...
- }
- //<
- //checking license
- _checker.check("YOUR_LICENSE_KEY_FOR_THE_APPLICATION"); //you can find it in your app's "Services and APIs" at developer's dahsboard
- protected function onLicensed(event:LicenseCheckerEvent):void
- {
- if(int(event.data) == LicenseCheckerEvent.OK)
- ... //everything is ok
- }
- protected function onNotLicensed(event:LicenseCheckerEvent):void
- {
- if(int(event.data) == LicenseCheckerEvent.RETRY)
- ... //probably there is no internet connection, read more info in docs
- else
- ... //not licensed
- }
- //<
复制代码 # Example for Samsung Apps- import com.pozirk.license.android.LicenseChecker;
- import com.pozirk.license.android.LicenseCheckerEvent;
- //> initialization
- try
- {
- _checker = new LicenseChecker();
- _checker.addEventListener(LicenseCheckerEvent.LICENSED, onLicensed);
- _checker.addEventListener(LicenseCheckerEvent.NOT_LICENSED, onNotLicensed);
- }
- catch(err:Error)
- {
- ...
- }
- //<
- //checking license, pass empty string, there is no key for samsung
- _checker.check("");
- protected function onLicensed(event:LicenseCheckerEvent):void
- {
- ... //everything's ok
- }
- protected function onNotLicensed(event:LicenseCheckerEvent):void
- {
- ... //not licensed
- }
复制代码 # MiscANE is build with AIR3.7, in order to rebuild for another version do the following:- edit "air\extension.xml" and change 3.7 in very first line to any 3.X you need;- edit "build_andy.bat" (for Google Play) or "build_sam.bat" (for Samsung Apps) and in the very last line change path from AIR3.7 SDK to any AIR3.X SDK you need;- execute "build.bat" to repack the ANE.
相关链接:
https://github.com/pozirk/ANELicenseChecker
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|