Add SohaGame SDK to project¶
Prerequisites¶
- Target API 36 or above
- JDK 17 or higher
Download and install the SDK¶
Step 1: Download¶
SohaGame provides you with all the necessary information such as game Id, package name, Facebook App Id, list of payment packages, API list , ... all found in documents, provided issued by our game operators. Should you need help with anything, please contact our project operators, language support staffs
Note
Please get the SDK and demo app download links from the project info Excel file that SohaGame has sent you.
Step 2: Importing SDK to the project¶
1. Copy SohaSDK.aar file to libs directory¶
2. Add the following code to the build.gradle project:¶
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://artifact.bytedance.com/repository/AwemeOpenSDK" }
flatDir {
dirs 'libs'
}
}
}
3. Add Google Service in build.gradle level project:¶
repositories {
google()
jcenter()
maven { url "https://artifact.bytedance.com/repository/AwemeOpenSDK" }
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.0'
classpath 'com.google.gms:google-services:4.4.3'
classpath 'com.google.firebase:perf-plugin:2.0.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.6'
}
4. Add the following code to the build.gradle app:¶
plugins {
id 'com.google.gms.google-services'
id 'com.google.firebase.firebase-perf'
id 'com.google.firebase.crashlytics'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
testImplementation 'junit:junit:4.13.2'
implementation 'com.google.android.material:material:1.13.0'
// Lifecycle
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:3.0.0'
implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
implementation 'com.squareup.okhttp3:logging-interceptor:5.3.0'
api 'com.squareup.retrofit2:converter-gson:3.0.0'
// Firebase
implementation platform('com.google.firebase:firebase-bom:34.5.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-config'
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.android.gms:play-services-auth:21.4.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.2.0'
implementation 'com.google.guava:guava:33.5.0-android'
implementation 'com.google.android.gms:play-services-auth:21.4.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.2.0'
implementation 'com.google.guava:guava:33.5.0-android'
implementation 'com.google.firebase:firebase-iid:21.1.0'
// Facebook SDK
implementation 'com.facebook.android:facebook-login:18.1.3'
// TikTok
implementation 'com.tiktok.open.sdk:tiktok-open-sdk-core:2.4.0'
implementation 'com.tiktok.open.sdk:tiktok-open-sdk-auth:2.4.0'
implementation 'com.tiktok.open.sdk:tiktok-open-sdk-share:2.4.0'
// In-App Billing
implementation 'com.android.billingclient:billing:8.0.0'
// MQTT
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
implementation 'com.github.hannesa2:paho.mqtt.android:4.2'
// Adjust
implementation 'com.adjust.sdk:adjust-android:5.5.0'
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0"
// Glide
implementation 'com.github.bumptech.glide:glide:5.0.5'
annotationProcessor 'com.github.bumptech.glide:compiler:5.0.5'
// MultiDex & Install Referrer
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.android.installreferrer:installreferrer:2.2'
api 'androidx.work:work-runtime:2.11.0'
implementation 'com.google.android.play:integrity:1.5.0'
//to listen for app life cycle
implementation 'androidx.lifecycle:lifecycle-process:2.9.4'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.9.4'
// UI Libraries
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
api 'com.intuit.sdp:sdp-android:1.1.1'
}