@@ -0,0 +1,1895 @@
+import org.apache.cordova.CallbackContext;%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport android.widget.LinearLayout;%0A%0Aimport com.amazon.device.ads.AdLayout;%0Aimport com.amazon.device.ads.AdRegistration;%0A%0A%0Apublic class AmazonAdsPlugin extends CordovaPlugin%7B%0A%09public AdLayout adView;%0A%09public static final String ACTION_DISPLAY_AMAZON_ADS = %22displayAmazonAds%22;%0A%09%0A%09%0A%09@Override%0A%09public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException %7B%0A%09%09try %7B%0A%09%09    if (ACTION_DISPLAY_AMAZON_ADS.equals(action)) %7B%0A%09%09    %09%0A%09%09    %09JSONObject arg_object = args.getJSONObject(0);%0A%09%09    %09displayAmazonAds(arg_object);%0A%09%09    %09callbackContext.success();%0A%09%09    %09return true;%0A%09%09    %7D%0A%09%09    callbackContext.error(%22Invalid action%22);%0A%09%09    return false;%0A%09%09%7D catch(Exception e) %7B%0A%09%09    System.err.println(%22Exception: %22 + e.getMessage());%0A%09%09    callbackContext.error(e.getMessage());%0A%09%09    return false;%0A%09%09%7D %0A%09%7D%0A%09%0A%09private void displayAmazonAds(JSONObject args_object) throws JSONException%7B%0A%09%09adView = (AdLayout) new AdLayout(this.cordova.getActivity());%0A%09%09boolean debug = args_object.getBoolean(%22debug%22);%0A%09%09boolean isOnTop = args_object.getBoolean(%22isOnTop%22);%0A%09%09String adKey = args_object.getString(%22adKey%22);%0A%09%09%0A%09%09// For debugging purposes enable logging, but disable for production builds.%0A        AdRegistration.enableLogging(debug);%0A        // For debugging purposes flag all ad requests as tests, but set to false for production builds.%0A        AdRegistration.enableTesting(debug);%0A        // Register Application Key%0A        AdRegistration.setAppKey(adKey);%0A        %0A        LinearLayout layout = new LinearLayout(this.cordova.getActivity());%0A        %0A        if(isOnTop)%0A        %09layout.addView(adView);%0A        else%0A        %09layout.addView(adView, layout.getChildCount());%0A        %0A        adView.loadAd();%0A%09%09%0A%09%09%0A%09%09%0A%09%7D%0A%7D%0A

Create AmazonAdsPlugin.java