Skip to content

Configure Info

Before you begin

Project Configuration

  1. Create client.txt file in your assets directory according to the following form:

    {
        "app_id": "21005e7c6680a5d2e8ee2ce1512e13d1",
        "app_id_facebook": "110142746174189",
        "client_token_facebook": "c63376b5e358e35c599f6ace5817f5b2",
        "client_name" : "SGDEMO",
        "client_code": "SGDEMO",
        "app_id_appsflyer": "4MDuMgiUXFLJVRYirfWar3"
    }
    

    • Replace app_id with app_id provided by SohaGame.
    • Replace app_id_facebook with app_id_facebook provided by SohaGame.
    • Replace client_token_facebook with client_token_facebook provided by SohaGame.
    • Replace client_name with client_name provided by SohaGame.
    • Replace client_code with client_code provided by SohaGame.
    • Replace app_id_appsflyer = "4MDuMgiUXFLJVRYirfWar3" (constant )
  2. Copy "google-services.json" file in project like either img.png

  3. Manifest.xml file configuration

    • Add android: name = "com.soha.sdk.SohaApplication" field in the application tag.
      <application
          android:name="com.soha.sdk.SohaApplication"
          tools:replace="android:allowBackup,android:icon,android:label">
      .......
      </application>
      
    • Use this tag android:exported="true" in Android Manifest.xml to register

    • Please add the following permissions:

      <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
      <uses-permission android:name="android.permission.FOREGROUND_SERVICE" tools:node="remove" />
      <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" tools:node="remove" />
      

    • Multidex configuration (For games that need to use multidex)
      Add multidex to build.gradle app:
      defaultConfig {
              applicationId "vn.sohagame.demosohagame"
              minSdkVersion 28
              targetSdkVersion 34
              versionCode 1
              versionName "1.0.1"
              multiDexEnabled true
          }