Android
This guide provides instructions for setting up the payment functionality in the Hive SDK on Android.
Hive console settings¶
To use the Hive SDK billing, you must first register the key value in the Hive console billing, integrate with the market, and complete the settings for payment providers.
Note
For more details, please check registering a Google Market account.
Add market¶
You need to add external libraries corresponding to the module-level build.gradle file. Only add the markets (payment providers) you will use.
Below is an example of adding external libraries to the module-level build.gradle file.
dependencies {
// IapV4, 아래 Market 추가시 자동 포함됩니다.
implementation "com.com2us.android.hive:hive-iapv4"
// IapV4 Market, 사용하는 Market만 추가합니다.
// 아마존
implementation "com.com2us.android.hive:hive-iapv4-market-amazon"
// Google
implementation "com.com2us.android.hive:hive-iapv4-market-google"
// Huawei
implementation "com.com2us.android.hive:hive-iapv4-market-huawei"
// Lebi
implementation "com.com2us.android.hive:hive-iapv4-market-lebi"
// ONEStore
implementation "com.com2us.android.hive:hive-iapv4-market-onestore"
// Samsung
implementation "com.com2us.android.hive:hive-iapv4-market-samsung"
// Hive Store
implementation "com.com2us.android.hive:hive-iapv4-market-hivestore"
}
Additional settings by market¶
Additional settings are required depending on the market.
Huawei payment settings¶
This is a guide for setting up Huawei Pay.
- Add agconnect-services.json
- Please add the agconnect-services.json file downloaded from the Huawei console to the Project folder.
- Configure the Project -build.gradle file
- Please add the AppGallery Connect plugin and Maven address.
buildscript { repositories { google() jcenter() // Huawei HMS Core SDK. maven {url 'https://developer.huawei.com/repo/'} } dependencies { ... // Huawei AppGallery Connect plugin classpath 'com.huawei.agconnect:agcp:1.9.1.301' } } allprojects { repositories { google() jcenter() /// Huawei HMS Core SDK. maven {url 'https://developer.huawei.com/repo/'} } }
- Please add the AppGallery Connect plugin and Maven address.
- Configure the App -build.gradle file
- Please add Huawei libraries and plugins.
Samsung galaxystore payment settings¶
This is a guide for setting up Samsung Galaxy Store payments.
-
Set the dependency for the libs folder in the module-level build.gradle file.
-
Add the external library samsung_iap_sdk-v6.1.aar from the Hive SDK distribution version to the module-level libs folder.
-
Remove the QQ, Wechat, Huawei, and Hive Ruby libraries from the module-level build.gradle file. If these libraries are included in the app build, it may be deemed not distributable during the Galaxy Store review process.
dependencies { // List of libraries to exclude from the Galaxy Store distribution build implementation "com.com2us.android.hive:hive-authv4-provider-qq" implementation "com.com2us.android.hive:hive-authv4-provider-wechat" implementation "com.com2us.android.hive:hive-authv4-provider-huawei" implementation "com.com2us.android.hive:hive-iapv4-market-lebi" }
-
Remove the library files below from the build. If the files below are included in the app build, you may receive a distribution prohibited judgment during the Galaxy Store review process.
- mid-sdk-{VERSION_INFO}.jar
- mta-sdk-{VERSION_INFO}.jar
- open_sdk_{VERSION_INFO}_lite.jar
One store payment settings¶
Set the following in the project-level build.gradle.
allprojects {
repositories {
...
// only for OneStore
maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public' }
...
}
}
Note
When using the One Store SDK V21, you can distribute your app on the One Store Global Platform. For more details, please refer to the One Store Global Distribution Guide and Setting Test Options for Global Store Distribution.