Skip to content

Latest commit

 

History

History
87 lines (54 loc) · 5.05 KB

NSVOD.md

File metadata and controls

87 lines (54 loc) · 5.05 KB

Native Subscription

This document outlines step-by-step instructions for setting up native subscription for your Android mobile app powered by Zype's Endpoint API service and app production software and SDK template.

Requirements and Prerequisites

Technical Contact

IT or developer support strongly recommended. Completing app submission and publishing requires working with Google Play Console, app bundles and IDE.

Google Play Console

A Google Account and Google Developer Account will be needed.

Android Studio

Google Play Console

Create Your App

  1. Log in to your Google Play Console and either select your app, or create one. You can follow this simple Google documentation if you need to create one.

Subscription Options

  1. After you hit create, look towards the left menu and pull down Store presence menu group and then select In-app products option. Then switch to Subscriptions tab.

  2. Click Create subscription button to create new subscription. Follow this guide for details of the creating subscription process. Take a note of subscription Product ID. You will need it further.

  3. Repeat the process for any other subscription options you would like to offer - yearly, weekly, etc.

    Note: To add In-app products you need to set up a merchant account. Follow this guide for details.

Android Studio project

  1. Open your Android Studio project and switch to the Android view.

Turn on Native subscription feature

  1. Expand the app folder and go to java/com.zype.android folder. Then open the ZypeSettings.java file.

  2. Set following constants as stated below::

    public static final boolean NATIVE_SUBSCRIPTION_ENABLED = true;
    ...
    public static final boolean UNIVERSAL_SUBSCRIPTION_ENABLED = false;
    

Map In-App items

  1. Expand the app folder and go to java/com.zype.android/Billing folder. Then open the SubscriptionsHelper.java file.

  2. In the getSkuList() method update the code where subscription SKUs are added to the array.

    For each your subscription option you should have following row:

        result.add("<Your product ID>");
    

    Use product ID of the subscription option that you have noted in step 3 as a string parameter of the add method.

    The result code of the method should look like this:

    public static List<String> getSkuList() {
        List<String> result = new ArrayList<>();
        result.add("com.zype.android.demo.monthly");
        result.add("com.zype.android.demo.yearly");
        return result;
    }
    

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.

  1. Build a signed APK file of your app and publish it in Google Play Console into alpha or beta channel.

  2. Enable testing in your alpha or beta channel and share opt-in URL with your testers.

  3. In left menu of Google Play Console select Settings option and the Account details. Add your tester accounts to the License Testing list. This will make testers to not charged when they test in-app purchases.