This document illustrates the steps required to enable multi-store payments.
The following requirements must be met to enable multi-store Payments:
The following stores are currently supported:
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:
The following steps are required to create an app build for the Samsung Galaxy Store.
libs
directory of your project by following the steps below:1. Extract the compressed nowSDK module and browse to Modules/Payments
directory to locate the samsung_iap-release.aar file in the package:
samsung_iap-release.aar
2. Add this provided .aar to the libs
directory of your project:
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"/>
The following steps are required to create an app build for Xiaomi GetApps.
Add the following dependencies in the module/app level build.gradle
:
implementation 'com.xiaomi.billingclient:billing:1.1.3'
Xiaomi requires a signed empty APK for verification purposes. The following steps illustrate the process.
Click here to download the empty APK.
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
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. |
Share the signed empty APK on dev-support@now.gg with the subject line ‘Xiaomi – Signed Empty APK’.
The following steps are required to create an app build for ONE Store.
Add the following dependencies in the module/app level build.gradle
:
implementation "com.onestorecorp.sdk:sdk-iap:21.01.00"
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") } } }
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>
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.** { *; }
ONE Store requires a signed output.zip
to publish your app for regions outside Korea, including global distribution.
output.zip
by exporting and encrypting your private signing key.output.zip
:Download the Play Encrypt Private Key (PEPK) tool from one of the following:
Note: The PEPK tool is developed and provided by Google. It is intended for secure encryption of app signing keys and must not be modified or redistributed without proper attribution.
Run the following command to generate your encrypted output.zip
file using the encryption key we provided. When prompted, enter your keystore and password:
$ java -jar pepk.jar --keystore=<your-keystore-file.keystore> --alias=<your-alias> --output=output.zip --include-cert --encryptionkey=<your-encryption-key>
Make sure to replace the following:
Share the signed output.zip on dev-support@now.gg with the subject line ‘ONE Store – output.zip’.
The following steps are required to create an app build for the Amazon Appstore.
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.
app/src/main/assets
directory of your Android Studio project.StreamingAssets
.
Assets/StreamingAssets
.Add the following entry within your app’s AndroidManifest.xml
:
<queries> <package android:name="com.amazon.sdktestclient" /> <package android:name="com.amazon.venezia" /> </queries>
The following steps are required to create an app build for Huawei AppGallery.
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'
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/'} } }
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.gg.
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.**{*;}
Enable Custom Launcher Manifest.
To do this:
Assets/Plugins/Android/LauncherManifest.xml
, as shown below: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.gg.
After you prepare the final APK, upload your build to nowStudio.
To do this:
Document Rev. 1.0