You will need an Amazon developer account in order to enable Native Subscriptions (In-App Items) for your Amazon Fire TV (Java based) application.
If you have not created a developer account, please visit our documentation HERE.
To create a Native Subscription in your Amazon developer account, please follow the steps below:
Creating In-App Items
Step 1: Log in to your Amazon Developer Portal and either select your app, or create one. You can follow this simple Amazon documentation if you need to create one.
Step 2: After you hit create, look towards the top and go to
In-App Items. Then click the
Add Subscription button.
Step 3: Create a subscription item following this guide. Make a note of the subscription item SKU and subscription period SKU. You will need them when configuring native subscription in your Android Studio project.
Repeat this step for any other subscription options you would like to offer - yearly, monthly, weekly etc.
Note: Each in-app item should have only one subscription period. For example, if you have monthly and yearly subscription options, you must add one subscription item with single monthly period and another subscription item with yearly period.
Next, you'll want to open or switch to your Android Studio project. If you have not started one yet, please refer to our documentation HERE.
Turn on Native Subscription
Navigate to Navigate to ZypeAPI > src > template > java > com > zype > fire > api > ZypeSettings.java
Step 1: Set your monetization settings exactly as stated below:
public static final boolean NATIVE_SUBSCRIPTION_ENABLED = true; public static final boolean NATIVE_TO_UNIVERSAL_SUBSCRIPTION_ENABLED = false;
Map In-App Items
Step 2: Expand the
PurchaseInterface folder and go to
assets. Then open the
Step 3: In the
skulist.json file add item to
skuList array for each your subscription option. Set
sku attribute value to your subscription item's SKU and set
purchaseSku attribute value to your subscription period SKU.
skuList array should look like this:
Now that you’ve set up your in-app items and configured your app, it’s time to test out the integration and see how IAP interacts with your media.
Follow this guide to test the native subscription monetization in your app.