Setup Multi-store Payments

now.gg Payments Module enables support for multi-store Payments when you leverage the multi-store publishing feature using nowStudio.

This document illustrates the steps required to enable multi-store payments.

Prerequisites

The following requirements must be met to enable multi-store Payments:

  • Payments Integration – Make sure you’ve integrated our Payments Module.
  • nowStudio Setup
    • Select the stores where you want to publish your app. Read more.

1. Supported Stores

The following stores are currently supported:

  • Powered by now.gg
    • Cloud Store
    • BlueStacks Store
  • Alternative Stores
    • Samsung Galaxy Store
    • Xiaomi GetApps
    • OnePlus OneStore
    • Amazon Appstore
    • Huawei AppGallery (Coming Soon)

2. Store-Specific Setup

Once you have integrated the Payments module, ensure that you include the following store-specific changes in your final build before providing us with the final APK.

Depending on your store selection, please refer to the following steps:

2.1 Amazon Appstore

The following steps are required to create an app build for Amazon Appstore.

2.1.1 PEM File

Amazon requires a PEM file that contains a unique app-specific public key to establish a secure communication channel between the Amazon Appstore and your app.

  • To get the PEM file, please reach out to us at dev-support@now.us.
  • Include the PEM file based on the following instructions:
  • Native Android:
    • Paste the PEM file into the app/src/main/assets directory of your Android Studio project.
      Note: If your app doesn’t have an assets directory, you must create one and place the PEM file into it.
  • Unity:
    • In the Assets folder of your project, create a new folder named StreamingAssets.
      • Paste the PEM file in Assets/StreamingAssets.

2.1.2 Update AndroidManifest.xml

Add the following entry within your app’s AndroidManifest.xml:

<queries>
     <package android:name="com.amazon.sdktestclient" />
     <package android:name="com.amazon.venezia" />
 </queries>


2.2 OnePlus OneStore

The following steps are required to create an app build for OnePlus OneStore.

2.2.1 Add Dependencies

Add the following dependencies in the module/app level build.gradle:

implementation "com.onestorecorp.sdk:sdk-iap:21.01.00"

2.2.2 Update the root build.gradle / settings.gradle

Update the root build.gradle or settings.gradle based on the following:

pluginManagement {
    repositories {
        google {
            content {
                includeGroupByRegex("com\\.android.*")
                includeGroupByRegex("com\\.google.*")
                includeGroupByRegex("androidx.*")
            }
        }
	  maven { url "https://jitpack.io" }
	 maven { url = uri("https://repo.onestore.net/repository/onestore-sdk-public") }
        mavenCentral()
        gradlePluginPortal()
    }
 }
 dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
	  maven { url "https://jitpack.io" }
	  maven { url = uri("https://repo.onestore.net/repository/onestore-sdk-public") }
    }
 }

2.2.3 Update AndroidManifest.xml

Add the following entry within your app’s AndroidManifest.xml:

<queries>
    <intent>
        <action android:name="com.onestore.ipc.iap.IapService.ACTION" />
    </intent>
    <intent>
        <action android:name="android.intent.action.VIEW" />
	<data android:scheme="onestore" />
    </intent>
 </queries>

2.2.4 Add ProGuard Rules

Add the following rules to the ProGuard configuration only if ProGuard/R8 is enabled:

# Core proguard rules
 -keep class com.gaa.sdk.base.** { *; }
 -keep class com.gaa.sdk.auth.** { *; }

 # Purchasing proguard rules
 -keep class com.gaa.sdk.iap.** { *; }
 -keep class com.onestore.extern.licensing.** { *; }

Important

  • You should only add these rules if ProGuard/R8 is enabled.


2.3 Xiaomi GetApps

The following steps are required to create an app build for Xiaomi GetApps.

2.3.1 Add Dependencies

Add the following dependencies in the module/app level build.gradle:

implementation 'com.xiaomi.billingclient:billing:1.1.3'

2.3.2 Signed Build (Empty APK)

Xiaomi requires a signed empty APK for verification purposes. The following steps illustrate the process.

Important Information

  • A signed empty APK is only required during initial submission.
  • If your app is published on Google Play, it is recommended that you use the same keystore for build signing.
  • Unity Users: Unity integrates keystore signing via Edit > Project Settings > Player > Publishing Settings. Ensure the correct keystore and alias are set before building.
1. Download Empty APK

Click here to download the empty APK.

2. Generate a Keystore (if not already available)

The following sample command illustrates this process:

keytool -genkey -v -keystore your-release-key.keystore -alias your-key-alias -keyalg RSA -keysize 2048 -validity 10000

Important Information

  • If your app is published on Google Play, it is recommended that you use the same keystore for build signing.
3. Sign the APK

The following sample command illustrates this process:

jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore your-release-key.keystore your-app.apk your-key-alias
Flags Summary
-digestalg SHA-256 Ensures a strong hash algorithm for signing integrity.
-keystore your-release-key.keystore Uses the previously generated keystore for signing.
your-app.apk Replace with your actual APK filename.
your-key-alias This should match the alias used when generating the keystore.
4.Share Signed APK

Share the signed empty APK on dev-support@now.us with the subject line ‘Xiaomi – Signed Empty APK’.



2.4 Huawei AppGallery (Coming Soon)

The following steps are required to create an app build for Huawei AppGallery.

2.4.1 Native Android

1. Add Dependencies

Add the following dependencies in the module/app level build.gradle:

implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
 implementation 'com.huawei.agconnect:agcp:1.9.1.303'
 implementation 'com.huawei.hms:iap:6.13.0.300'

2. Update the root build.gradle / settings.gradle

Update the root build.gradle or settings.gradle based on the following:

pluginManagement {
    repositories {
        google {
            content {
                includeGroupByRegex("com\\.android.*")
                includeGroupByRegex("com\\.google.*")
                includeGroupByRegex("androidx.*")
            }
        }
        maven {url 'https://developer.huawei.com/repo/'}
        mavenCentral()
        gradlePluginPortal()
    }
 }
 dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {url 'https://developer.huawei.com/repo/'}
    }
 }

3. Update AndroidManifest.xml

Add the following entry within your app’s AndroidManifest.xml:

<Application>
 <meta-data
     android:name="com.huawei.hms.client.appid"
     android:value="<HUAWEI_APP_ID>">
 </meta-data
 </Application>

Note: You can get the HUAWEI_APP_ID by reaching out to us at dev-support@now.us.


4. Add ProGuard Rules

Add the following rules to the ProGuard configuration only if ProGuard/R8 is enabled:

-ignorewarnings
 -keepattributes *Annotation*
 -keepattributes Exceptions
 -keepattributes InnerClasses
 -keepattributes Signature
 -keepattributes SourceFile,LineNumberTable
 -keep class com.huawei.hianalytics.**{*;}
 -keep class com.huawei.updatesdk.**{*;}
 -keep class com.huawei.hms.**{*;}

Important

  • You should only add these rules if ProGuard/R8 is enabled.

2.4.2 Unity

Enable Custom Launcher Manifest.

To do this:

  • Go to Project Settings > Player > Build
  • Enable Custom Launcher Manifest Assets/Plugins/Android/LauncherManifest.xml, as shown below:
  • Update LauncherManifest.xmlAdd the following entry within your app’s LauncherManifest.xml:
    <Application>
     <meta-data
         android:name="com.huawei.hms.client.appid"
         android:value="<HUAWEI_APP_ID>">
     </meta-data
     </Application>
    

Note: You can get the HUAWEI_APP_ID by reaching out to us at dev-support@now.us.



2.5 Samsung Galaxy Store

The following steps are required to create an app build for the Samsung Galaxy Store.

2.5.1 Update AndroidManifest.xml

Add the following entry within your app’s AndroidManifest.xml:

<uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
 <uses-permission android:name="android.permission.INTERNET"/>


3. Submit Final APK

After you prepare the final APK, upload your build to nowStudio.

To do this:

  • Create a Production Release.
  • Our operations team will review the app submission and contact you for any amendments/requirements.
  • Once verified, our team will upload your app build to various stores.
  • After the app is approved, you will be notified via email, and store-specific links will be available for reference under the release tab in nowStudio.

×
Text copied to clipboard
Link copied to clipbord
Questions? Please reach out to us at dev-support@now.us