What changes about DRM and IAP
Previously, when you uploaded Android APKs into the Amazon Appstore, you had the option to select Yes or No for “Apply Amazon DRM?”, as shown in the following screenshot:
If you selected Yes, Amazon would add DRM to your app.
With the Appstore SDK, the Developer Console no longer displays this option. If you want to add DRM to your APK, use the DRM API (included in the Appstore SDK) to incorporate license checking in your app.
Previously, when you wanted IAP functionality, you downloaded a standalone IAP JAR and incorporated it into your app. As of Appstore SDK, the IAP API is no longer available as a separate JAR file; instead, it’s bundled with the Appstore SDK JAR file. To implement IAP, you must incorporate the Appstore SDK.
See Other Changes to IAP below for details on how you now determine the mode in which the IAP runs.
How to transition from Amazon-managed DRM to the Appstore SDK
If your existing app uses Amazon-managed DRM, switch to the DRM API by doing the following:- In the Developer Console, create an Upcoming Version of your app.
- Configure your app with a public key and integrate the Appstore SDK into your Android project by following the instructions in Integrate the Appstore SDK.
- Add logic in your app to check for licenses by following the instructions in DRM for Android.
- Build a new version of your APK, upload it into the Developer Console, and submit it.
How to transition from the standalone IAP to the Appstore SDK
If your existing app integrates the standalone IAP API, you must switch to the new Appstore SDK by doing the following:- In Android Studio, remove the in-app-purchasing JAR from your app and any references to it.
-
Configure your app with a public key and integrate the Appstore SDK into your Android project by following the instructions in Integrate the Appstore SDK.
The same code you previously added for IAP will work with the Appstore SDK. Older functionality in the IAP API remains unchanged (except for
IS_SANDBOX_MODE, which is used for testing – see Other Changes to IAP below). - Build the new version of your APK, upload it into the Developer Console, and submit it.
Other changes to IAP
Most of the IAP implementation details have remained the same apart from theIS_SANDBOX_MODE value in the PurchasingService class which is removed in the Appstore SDK.
You must now call the getAppstoreSDKMode() method of the LicensingService class to determine the mode in which the SDK is currently running. Before invoking getAppstoreSDKMode(), you must call LicensingService.verifyLicense().
| SDK Modes | Description |
|---|---|
SANDBOX | App is being tested and interacts only with the Amazon App Tester. |
PRODUCTION | App communicates with Amazon Appstore and customer accounts for all the API calls. Note that only apps submitted to the Amazon Appstore receive successful responses from Amazon. |
UNKNOWN | This mode indicates that the SDK hasn’t been initialized by calling verifyLicense(). |

