Update Needed to Amazon IAP Plugin?

I just received a message from Amazon stating that they have changed the syntax of the AndroidManifest.xml, and I would need to update my manifest accordingly to keep in-app purchases working properly. Since I don’t build natively and don’t have an AndroidManifest.xml, I am presuming that this is something that is handled by plugin.amazon.iap.

In looking into this, I noticed that there are two versions of plugin.amazon.iap over at the plugin directory. One has publisherId = "com.coronalabs", and the other has publisherId = "com.amazon". The documentation still says to use com.coronalabs, but I also noticed that the com.amazon plugin is listed as having been more recently updated.

Does anyone know what’s going on with this?

What do they want you to add to the AndroidManifest?

The instructions are to move android:permission out of <intent-filter>.

Old code:

<receiver android:name = "com.amazon.device.iap.ResponseReceiver">
    <intent-filter>
        <action android:name = "com.amazon.inapp.purchasing.NOTIFY"
            android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY"/>
    </intent-filter>
</receiver>

New code:

<receiver android:name = "com.amazon.device.iap.ResponseReceiver"
      android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY">
    <intent-filter>
      <action android:name = "com.amazon.inapp.purchasing.NOTIFY" />
    </intent-filter>
  </receiver>

Created a pull request with this change.

1 Like

Deployed. Can anyone check if it still works?

1 Like

I tested it. I don’t have an update ready for the store, but I did push my current version to my test device and was able to purchase items from the store. So at worse no harm.