Configure the Manifest.xml File
1. targetSdkVersion
- Set the game's targetSdkVersion to the specified version, as currently required when uploading new packages to Google. See Packaging Notes for details.
2. Android Studio Minimum SDK Version
- Set minSdkVersion to 24.
3. Add Permissions
java
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />4. Add Component Declarations
xml
<!-- appsflyer -->
<receiver
android:name="com.appsflyer.MultipleInstallBroadcastReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- If Twitter login is used, add the following declaration -->
<!-- Twitter start -->
<activity
android:name="com.gdsdk.activity.GDTwitterLoginActivity"
android:launchMode="singleTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="<!--Use the app package name with '.' removed by default; confirm with the technical team-->" />
</intent-filter>
</activity>
<!-- Twitter end -->
<!-- If WhatsApp login is used, add the following declaration -->
<!-- WhatsApp start -->
<activity
android:name="com.gd.platform.login.GDWhatsAppLoginActivity"
android:launchMode="singleTask"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="<!--Confirm with the technical team-->" />
</intent-filter>
</activity>
<!-- WhatsApp end -->5. Add Facebook Component Declarations
- Under the application tag in the game's manifest file, add the following components. Add the fbID at the specified position; the fbID is provided in the SDK's README.txt file.
java
<!-- fb -->
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<!-- Facebook image sharing -->
<activity android:name="com.gd.sdk.activity.GdFacebookImageShareActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<provider android:authorities="com.facebook.app.FacebookContentProvider<!--Replace this comment with the FaceBookID value from readme.txt-->"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
android:value="false" />
<!-- 2023.2.2 add -->
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token" />