Adds initial Amazon store support. This won't work right away as it requires special RevenueCat setup that's not available for all customers.
In order to use please point to this tag in your package.json
like this:
"cordova-plugin-purchases": "RevenueCat/cordova-plugin-purchases#3.0.0-amazon.alpha.1"
Then configure the package using your RevenueCat API key specific for Amazon and passing useAmazon: true
:
Purchases.setup({apiKey: "api_key", useAmazon: true});
Please note that the setup call has changed and now accepts an object. This is to be able to use named arguments.
The next step would be to add the Amazon jar
to your project by downloading the .zip from Amazon and then unzipping and moving the in-app-purchasing-2.0.76.jar
into your project root. Then add the jar to the config.xml
in the android platform section:
<platform name="android">
<allow-intent href="market:*" />
<resource-file src="in-app-purchasing-2.0.76.jar" target="app/libs/in-app-purchasing-2.0.76.jar" />
</platform>
This will copy the .jar
in the app/libs
folder of the project when calling cordova prepare android
:

Due to some limitations, RevenueCat will only validate purchases made in production or in Live App Testing and won't validate purchases made with the Amazon App Tester.
To view new release, visit https://github.com/RevenueCat/cordova-plugin-purchases/releases/tag/3.0.0-amazon.alpha.1