How can we help?

Creating Native Subscriptions in Amazon Fire TV (Java based) Follow

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.

68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d30425f41625f6a35456d4d413463444a614d6b38324d576b32614645.png

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. 

68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d30425f41625f6a35456d4d41345631686b656d705559314258634645.png

68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d30425f41625f6a35456d4d4134533270594c585a7464453957544655.png

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 skuslist.json file. 

68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d30425f41625f6a35456d4d413454554e6a4d32397862484a54567a67.png

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.

Your skuList array should look like this:

Screen_Shot_2018-10-26_at_1.29.14_PM.png

Testing

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.

Comments

Please sign in to leave a comment.