To execute Gamebase in Android, the following system environment is required.
[Minimum Specifications]
- User execution environment: Android API 22 (Lollipop MR1, OS 5.1) or higher
- Build environment: Android Gradle Plugin 7.4.2 or higher
- Development environment: Android Studio
| Gamebase SDK | Gamebase Adapter | External SDK | Purpose | minSdkVersion |
|---|---|---|---|---|
| Gamebase | gamebase-sdk | nhncloud-core-1.12.0 nhncloud-common nhncloud-crash-reporter-ndk nhncloud-logger gson-2.8.9 okhttp-3.12.13 kotlin-stdlib-1.8.0 kotlin-stdlib-jdk8 kotlinx-coroutines-core-1.6.4 kotlinx-coroutines-android age-signals-0.0.2 |
Include the interface and core logic of Gamebase | API 22(Lollipop MR1, OS 5.1) |
| Gamebase Auth Adapters | gamebase-adapter-auth-appleid | - | Support Sign In With Apple login | - |
| gamebase-adapter-auth-facebook | facebook-login-18.0.0 | Support Facebook login | - | |
| gamebase-adapter-auth-google | credentials-play-services-auth-1.3.0 play-services-auth-20.3.0 |
Support Google login | - | |
| gamebase-adapter-auth-gpgs-v2 | play-services-games-v2-20.1.2 | Support GPGS(Google Play Games Services) V2 login Based on Player ID |
- | |
| gamebase-adapter-auth-gpgs-autologin | play-services-games-v2-20.1.2 | Support Google Play Games Services (GPGS) auto-sign-in | - | |
| gamebase-adapter-auth-hangame | hangame-id-1.17.3 | Support Hangame login | - | |
| gamebase-adapter-auth-line | linesdk-5.8.1 | Support LINE login | - | |
| gamebase-adapter-auth-naver | naveridlogin-android-sdk-5.8.0 | Support NAVER login | - | |
| gamebase-adapter-auth-payco | payco-login-1.5.17 | Support PAYCO login | - | |
| gamebase-adapter-auth-twitter | - | Support Twitter login | API 25(Nougat, OS 7.1.1) | |
| gamebase-adapter-auth-weibo | sinaweibosdk.core-13.10.5 | Support Weibo login | - | |
| gamebase-adapter-auth-kakaogame | kakaogame.idp_kakao-3.19.3 kakaogame.gamesdk-3.19.3 kakaogame.common-3.19.3 kakao.sdk.v2-auth-2.17.0 kakao.sdk.v2-partner-auth-2.17.0 kakao.sdk.v2-common-2.17.0 play-services-ads-identifier-17.0.0 |
Support Kakao login | API 23(Marshmallow, OS 6.0) | |
| gamebase-adapter-auth-steam | - | Support Steam login | API 25(Nougat, OS 7.1.1) | |
| Gamebase IAP Adapters | gamebase-adapter-toastiap | nhncloud-iap-core | Support in-app purchase | - |
| gamebase-adapter-purchase-galaxy | nhncloud-iap-galaxy | Support Samsung Galaxy Store | - | |
| gamebase-adapter-purchase-google | billing-7.1.1 nhncloud-iap-google |
Support Google Play | API 24(Nougat, OS 7.0) Desugaring declaration required for API 23 or lower support |
|
| gamebase-adapter-purchase-huawei | nhncloud-iap-huawei | Support Huawei AppGallery | - | |
| gamebase-adapter-purchase-onestore | nhncloud-iap-onestore | Support ONE store v17 | - | |
| gamebase-adapter-purchase-onestore-v19 | nhncloud-iap-onestore-v19 | Support ONE store v19 | - | |
| gamebase-adapter-purchase-onestore-v21 | nhncloud-iap-onestore-v21 | Support ONE store v21 | API 23(Marshmallow, OS 6.0) | |
| gamebase-adapter-purchase-onestore-external | nhncloud-iap-onestore-external | Support ONE store external payment function | - | |
| gamebase-adapter-purchase-mycard | nhncloud-iap-mycard | Support MyCard payment function | - | |
| Gamebase Push Adapters | gamebase-adapter-toastpush | nhncloud-push-analytics nhncloud-push-core nhncloud-push-notification |
Support Push | - |
| gamebase-adapter-push-fcm | firebase-messaging-17.6.0 nhncloud-push-fcm |
Support Firebase Cloud Messaging | - |
[Caution]
- Make sure that Gamebase service is enabled by creating a new project from NHN Cloud Console.
- Make sure that Client ID is issued by each IdP console and the IDs are entered in the Gamebase console.
buildscript {
repositories {
...
// [Huawei App Gallery] Maven repository address for the HMS Core SDK.
maven { url 'https://developer.huawei.com/repo/' }
}
dependencies {
...
// [Huawei App Gallery] AppGallery Connect plugin configuration. please use the latest plugin version.
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
}
}
mavenCentral() storage. // >>> [Huawei App Gallery] agconnect plugin for huawei - when Native Android build
apply plugin: 'com.huawei.agconnect'
repositories {
// >>> For Gamebase SDK
mavenCentral()
...
// >>> [Huawei App Gallery]
maven { url 'https://developer.huawei.com/repo/' }
// >>> [ONE store v21]
maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public' }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// >>> Gamebase Version
def GAMEBASE_SDK_VERSION = 'x.x.x'
// >>> Gamebase - Add Auth Adapter
implementation "com.toast.android.gamebase:gamebase-adapter-auth-google:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-gpgs-v2:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-facebook:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-appleid:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-twitter:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-naver:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-line:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-payco:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-weibo:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-steam:$GAMEBASE_SDK_VERSION"
// >>> [Purchase Support under Android 7.0(API Level 24)]
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
// >>> Gamebase - Select Purchase Adapter
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-google:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-onestore-v21:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-onestore-external:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-galaxy:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-huawei:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-mycard:$GAMEBASE_SDK_VERSION"
// >>> Gamebase - Select Push Adapter
implementation "com.toast.android.gamebase:gamebase-adapter-push-fcm:$GAMEBASE_SDK_VERSION"
// >>> Regarding how to use the following modules, please contact the Customer Center.
implementation "com.toast.android.gamebase:gamebase-adapter-auth-hangame:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-hangamejp:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-hangamejpemail:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-auth-kakaogame:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-paychorus-external:$GAMEBASE_SDK_VERSION"
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-paychorus-google:$GAMEBASE_SDK_VERSION"
// >>> [ONE store v16]
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-onestore-v16:$GAMEBASE_SDK_VERSION"
// >>> [ONE store v17]
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-onestore:$GAMEBASE_SDK_VERSION"
// >>> [ONE store v19]
// https://github.com/ONE-store/onestore_iap_release/tree/iap19-release/android_app_sample/app/libs
implementation files('libs/iap_sdk-v19.01.00.aar')
implementation "com.toast.android.gamebase:gamebase-adapter-purchase-onestore-v19:$GAMEBASE_SDK_VERSION"
// >>> [GPGS Auto Login]
implementation "com.toast.android.gamebase:gamebase-adapter-auth-gpgs-autologin:$GAMEBASE_SDK_VERSION"
// >>> [Push Custom Receiver]
implementation "com.toast.android.gamebase:gamebase-adapter-push-notification:$GAMEBASE_SDK_VERSION"
}
android {
compileOptions {
// >>> [Purchase Support under Android 7.0(API Level 24)]
coreLibraryDesugaringEnabled true
}
}
For a Unity build
Download the google-services.json file from 'Firebase Console > Project Settings' along with the generate_xml_from_google_services_json.exe file for xml conversion, and execute the command below to convert the json file to an xml file.
"{UnityProject}\Firebase\Editor\generate_xml_from_google_services_json.exe" -i "{JsonFilePath}\google-services.json" -o "{UnityProject}\Assets\Plugins\Android\res\values\google-services.xml" -p "{PackageName}"
Add the converted xml file to the 'Android Library Project' as a resource.
For a Unreal build
To attach photos and media when writing an inquiry on the Customer Center (Game > Gamebase > Android SDK User Guide > ETC > Additional Features > Contact), storage read permission declaration is required on devices below Android API Level 21 (OS 5.0).
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="21"/>
If you need the READ_EXTERNAL_STORAGE permission even on devices with Android API Level 22 or higher, you must remove the android:maxSdkVersion="21" syntax and implement a runtime permission request.
AndroidManifest.xml
<manifest ...>
<application ...>
...
<!-- [Facebook] Configurations begin -->
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
<!-- [Facebook] Configurations end -->
...
</application>
</manifest>
res/values/strings.xml
<resources>
<!-- [Facebook] Facebook APP ID & Client Token -->
<string name="facebook_app_id">123456789012345</string>
<string name="facebook_client_token">a01234bc56de7fg89012hi3j45k67890</string>
</resources>
AndroidManifest.xml
<manifest ...>
<application ...>
...
<!-- [GPGS] Configurations begin -->
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/google_play_game_services_project_id" />
<!-- [GPGS] Configurations end -->
...
</application>
</manifest>
res/values/strings.xml
<resources>
<!-- [GPGS] Google Play Games Application ID -->
<string name="google_play_game_services_project_id">1234567890</string>
</resources>
<application android:networkSecurityConfig="@xml/my_network_security_config"
...>
...
</application>
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<!-- Weibo SDK start -->
<domain includeSubdomains="true">sina.cn</domain>
<domain includeSubdomains="true">weibo.cn</domain>
<domain includeSubdomains="true">weibo.com</domain>
<domain includeSubdomains="true">sinaimg.cn</domain>
<domain includeSubdomains="true">sinajs.cn</domain>
<domain includeSubdomains="true">sina.com.cn</domain>
<!-- Weibo SDK end -->
</domain-config>
</network-security-config>
<manifest>
...
<application>
...
<!-- [ONE store] Configurations begin -->
<!-- popup:payment popup window / full:full payment screen -->
<meta-data
android:name="iap:view_option"
android:value="popup | full" />
<!-- [ONE store] Configurations end -->
...
</application>
</manifest>
| Payment screen | Set value |
|---|---|
| Full payment screen | "full" |
| Payment popup window | "popup" |
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="appid=123456789">
</meta-data>
<meta-data
android:name="com.huawei.hms.client.cpid"
android:value="cpid=1234567891234">
</meta-data>
Caution: Huawei App Gallery must be installed on your device to make payment normally.
<application
android:name="com.toast.android.gamebase.purchase.mycard.GamebaseMyCardApplication"
...>
...
</application>
class MyApplication: GamebaseMyCardApplication() {
...
}
<application>
<meta-data android:name="iap:test_mode" android:value="true | false"/>
</application>
Example
<!-- When you have multiple applications sharing an Gamebase project, use this field to identify each application. -->
<meta-data android:name="com.nhncloud.sdk.push.deviceId.salt"
android:value="ApplicationForGoogleStore" />
<!-- Notification priority -->
<meta-data android:name="com.toast.sdk.push.notification.default_priority"
android:value="1"/>
<!-- Notification background color -->
<meta-data android:name="com.toast.sdk.push.notification.default_background_color"
android:resource="@color/defaultNotificationColor"/>
<!-- LED light -->
<meta-data android:name="com.toast.sdk.push.notification.default_light_color"
android:value="#0000ff"/>
<meta-data android:name="com.toast.sdk.push.notification.default_light_on_ms"
android:value="0"/>
<meta-data android:name="com.toast.sdk.push.notification.default_light_off_ms"
android:value="500"/>
<!-- Small icon -->
<meta-data android:name="com.toast.sdk.push.notification.default_small_icon"
android:resource="@drawable/ic_notification"/>
<!-- Sound -->
<meta-data android:name="com.toast.sdk.push.notification.default_sound"
android:value="notification_sound"/>
<!-- Vibrate pattern -->
<meta-data android:name="com.toast.sdk.push.notification.default_vibrate_pattern"
android:resource="@array/default_vibrate_pattern"/>
<!-- Vibration setup -->
<meta-data android:name="com.toast.sdk.push.notification.vibration_enabled"
android:resource="true"/>
<!-- Use badge icon or not -->
<meta-data android:name="com.toast.sdk.push.notification.badge_enabled"
android:value="true"/>
<!-- Enable notification when application is foreground. -->
<meta-data android:name="com.toast.sdk.push.notification.foreground_enabled"
android:value="false"/>
| meta-data key | value type | description |
|---|---|---|
| com.nhncloud.sdk.push.deviceId.salt | String | If different applications share a single Gamebase project, push does not work properly. You must specify a different random 'salt' value for each app. |
| com.toast.sdk.push.notification.default_priority | int | Priorities. You can set the following five values: NoticationComapt.PRIORITY_MIN : -2 NoticationComapt.PRIORITY_LOW : -1 NoticationComapt.PRIORITY_DEFAULT : 0 NoticationComapt.PRIORITY_HIGH : 1 NoticationComapt.PRIORITY_MAX : 2 |
| com.toast.sdk.push.notification.default_background_color | int | Background color. |
| com.toast.sdk.push.notification.default_light_color | int | LED color. |
| com.toast.sdk.push.notification.default_light_on_ms | int | Time when the LED light turns on. |
| com.toast.sdk.push.notification.default_light_off_ms | int | Time when the LED light turns off. |
| com.toast.sdk.push.notification.default_small_icon | resource id | Resource identifier in small icon. |
| com.toast.sdk.push.notification.default_sound | String | Notification sound file name. Works only in AOS 8.0 or earlier. The notification sound will change as you specify the .mp3 or .wav file name in the 'res/raw' folder. |
| com.toast.sdk.push.notification.default_vibrate_pattern | long[] | Vibration pattern. |
| com.toast.sdk.push.notification.vibration_enabled | boolean | Whether to use a vibration or not. |
| com.toast.sdk.push.notification.badge_enabled | boolean | Whether to use a badge icon or not. |
| com.toast.sdk.push.notification.foreground_enabled | boolean | Whether to use the foreground notification or not. |
[Caution]
- “queries” tag cannot be recognized by the existing Android Gradle Plugin(AGP), so the build fails.
- Refer to the guide and table below and upgrade to the AGP version, which allows “queries” tag build.
- https://android-developers.googleblog.com/2020/07/preparing-your-build-for-package-visibility-in-android-11.html
- If using a version higher than AGP 4.1.0, the AGP does not need to be upgraded.
| If you are using the Android Gradle plugin version... |
...upgrade to: | Unity Editor |
|---|---|---|
| 4.1.* | N/A (no upgrade needed) | - |
| 4.0.* | 4.0.1 | - |
| 3.6.* | 3.6.4 | 2020.1 ~ |
<manifest>
<!-- [Android11] settings start -->
<queries>
<!-- [All SDK] AppToWeb Authenthcation support start -->
<package android:name="com.android.chrome" />
<package android:name="com.chrome.beta" />
<package android:name="com.chrome.dev" />
<package android:name="com.sec.android.app.sbrowser" />
<!-- [All SDK] AppToWeb Authenthcation support end -->
<!-- [Facebook] Configurations begin -->
<package android:name="com.facebook.katana" />
<!-- [Facebook] Configurations end -->
<!-- [PAYCO/Hangame] Configurations begin -->
<package android:name="com.nhnent.payapp" />
<!-- [PAYCO/Hangame] Configurations end -->
<!-- [Hangame] Configurations begin -->
<package android:name="com.nhn.hangameotp" />
<package android:name="com.sci.siren24.ipin" />
<package android:name="kr.co.samsungcard.mpocket" />
<package android:name="com.lcacApp" />
<package android:name="com.shcard.smartpay" />
<package android:name="com.hyundaicard.appcard" />
<package android:name="com.kbcard.cxh.appcard" />
<package android:name="com.hanaskcard.paycla" />
<package android:name="kvp.jjy.MispAndroid320" />
<package android:name="nh.smart.nhallonepay" />
<!-- [Hangame] Configurations end -->
<!-- [NAVER] Configurations begin -->
<package android:name="com.nhn.android.search" />
<!-- [NAVER] Configurations end -->
<!-- [Weibo] Configurations begin -->
<package android:name="com.weico.international" />
<package android:name="com.sina.weibo" />
<!-- [Weibo] Configurations end -->
<!-- [ONE store] Configurations begin -->
<!-- Starting with Android 2.60.0 and later, the ONE store queries declaration is not required. -->
<intent>
<action android:name="com.onestore.ipc.iap.IapService.ACTION" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="onestore" />
</intent>
<!-- [ONE store] Configurations end -->
<!-- [Galaxy store] Configurations begin -->
<package android:name="com.sec.android.app.samsungapps" />
<!-- [Galaxy store] Configurations end -->
</queries>
<!-- [Android11] settings end -->
</manifest>

The API which is not supported by Gamebase anymore is processed as deprecated (deprecate). A deprecated API can be deleted without any prior notice when the following conditions are met: