守望者--AIR技术交流
标题: 与亚马逊的MP3应用程序交互的ANE (Android+IOS) [打印本页]
作者: 破晓 时间: 2015-1-22 11:24
标题: 与亚马逊的MP3应用程序交互的ANE (Android+IOS)
Air Native Extension for Amazon MP3 (Android)This is an Air native extensions to interact with the Amazon MP3 application on Android. It has been developed by FreshPlanet and is used in the game SongPop.
InstallationThe ANE binary (AirAmazonMP3.ane) is located in the bin folder. You should add it to your application project's Build Path and make sure to package it with your app (more information here).
UsageOnly three interactions are supported at this time:
- show album detail
- show track detail
- search
If the Amazon MP3 application is not installed, the ANE will fallback on the Amazon mobile web store.
- // Set the user's country (used to pick the right Amazon mobile web store)
- AirAmazonMP3.getInstance().country = "fr"; // France
- // Show an album detail and highlight a track (autoplay on Amazon MP3 app)
- AirAmazonMP3.getInstance().showAlbumDetail("SOME_ALBUM_ASIN", "SOME_TRACK_ASIN", "MY_REFERRER_NAME");
- // Show a track detail (mobile web store only)
- AirAmazonMP3.getInstance().showTrackDetail("SOME_TRACK_ASIN", "MY_REFERRER_NAME");
- // Perform a search
- AirAmazonMP3.getInstance().search("MY_SEARCH_STRING", "MY_REFERRER_NAME");
复制代码 Build scriptShould you need to edit the extension source code and/or recompile it, you will find an ant build script (build.xml) in the
build folder:
- cd /path/to/the/ane/build
- mv example.build.config build.config
- #edit the build.config file to provide your machine-specific paths
- ant
复制代码 Authors
This ANE has been written by
Alexis Taugeron. It belongs to
FreshPlanet Inc. and is distributed under the
Apache Licence, version 2.0.
[attach]577[/attach]
相关链接:
https://github.com/freshplanet/ANE-AmazonMP3
| 欢迎光临 守望者--AIR技术交流 (http://www.airmyth.com/) |
|