Amazon Mobile Ads ANE
Switch branches/tags
Nothing to show
Clone or download
Latest commit afb8182 Jul 30, 2014


ANEAmazonAds is an Adobe AIR native extension (ANE) for Kindle tablets (and others Android devices) to show Amazon Ads.
Supported functionality:

  • show ad;
  • hide ad;
  • cache interstitial;
  • show interstitial;
  • listen tap, close, etc. event.


Please, read docs and try ANE before asking any questions.


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

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<activity android:name="" android:configChanges="keyboardHidden|orientation|screenSize"/>

Internet permission is mandatory, others are optional.




protected var _amazonAds:AmazonAds = null;


//> initialization of AmazonAds
_amazonAds = new AmazonAds();
_amazonAds.addEventListener(AdEvent.AD_LOADED, onEvent);
_amazonAds.addEventListener(AdEvent.AD_FAILED_TO_LOAD, onEvent);
_amazonAds.addEventListener(AdEvent.AD_EXPANDED, onEvent);
_amazonAds.addEventListener(AdEvent.AD_COLLAPSED, onEvent);
_amazonAds.enableLogging(true); //for debug only!
_amazonAds.enableTesting(true); //for debug only!


protected function onEvent(ae:AdEvent):void
	trace(ae.type+" "+ae._data);

//showing 600x90 ad at the bottom center side of the screen, AdParams.HALIGN_CENTER, AdParams.VALIGN_BOTTOM);
_amazonAds.setTimeout(30000); //set timeout (in milliseconds) to load new ad, not sure if it works properly...

//caching interstitial

//showing interstitial

Game with Amazon Mobile Ads
If Amazon Ads don't work (no fill), game will fall back to AdMob.
In order to see the interstitial ad, you need to win/lose any game.


ANE is build with AIR14.0, in order to rebuild for another version (prior 14.0) do the following:

  • edit "air\extension.xml" and change 14.0 in very first line to any SDK you need;
  • edit "build.bat" and in the very last line change path from AIR14.0 SDK to any AIR SDK you need;
  • execute "build.bat" to repack the ANE.