-
Notifications
You must be signed in to change notification settings - Fork 3
Update Android Manifest
⚡ Before you start
Make sure you have correctly Include Android.
If you do not find the manifest file Plugins/Android/AndroidManifest.xml, you can take it from the example.
Or Unity 2019.3+ makes it possible to activate in Player Settings > Publishing Settings > Build > Custom Main Manifest checkmark.
If your app targets Android 12, then you must explicitly declare the android:exported attribute. For all changes in Android 12, see Behavior changes in Android 12
Add the android:exported="true" attribute to the <activity> tag to Assets/Plugins/Android/AndroidManifest.xml:
<application ...>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>Sometimes permissions are included in the partner SDK’s internal AndroidManifest.
To remove a specific embedded permission (for example, ACCESS_COARSE_LOCATION), add the following tag to your top level AndroidManifest during integration:
<manifest>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
</manifest>What’s Next?
- Preparing Mediated Networks
- Make sure you are Include iOS platform as well.
- Verify your integration
Important
We've moved!
Visit the updated CAS.AI docs.
- Project Setup
- Configuring SDK
- Include Android
- Include iOS
- Additional mediation steps
- App-ads.txt🔗