This project is a simple demonstration of the Amazon IAP API on a Amazon Fire Tablet.
- Clone the demo app repository:
git clone https://github.com/AmazonAppDev/amazon-iap-kotlin.git
- Connect your Fire tablet device following these instructions.
Step 1: Push the example amazon.sdktester.json file to your device using the command:
adb push <_Your_JSON_File_Folder_>/amazon.sdktester.json /sdcard/amazon.sdktester.json
This JSON file is usually created when you create IAP items in the developer portal, however, for the sake of this demo we can use an example JSON.
Step 2: Set your app in sandbox mode using the following command:
adb shell setprop debug.amazon.sandboxmode debug
Sandbox mode constrains calls that would normally go to the Appstore client to route to the Amazon App Tester app instead. Use this mode only for testing locally.
Step 3: Install the IAP app tester from the Amazon appstore. Once you install it you should be able to see the JSON file of the IAP items you created.
You can now run the demo app!
Note: When you run the demo app, it uses the App Tester, which allows you to test the In-App Purchasing (IAP) functionality of your app in sandbox mode.
You can use this demo as a starting point to build a Kotlin app with an integration to the Amazon IAP API. To learn more about the API you can check out the documentation or the YouTube series I created.
If you found a bug or want to suggest a new [feature/use case/sample], please file an issue.
If you have questions, comments, or need help with code, we're here to help:
- on X at @AmazonAppDev
- on Stack Overflow at the amazon-appstore tag
Get the most up to date Amazon Appstore developer news, product releases, tutorials, and more:
-
π£ Follow @AmazonAppDev and our team on Twitter
-
πΊ Subscribe to our Youtube channel
-
π§ Sign up for the Developer Newsletter