Merging manifest with another Android plugin

Warning: Starting from version 5.0 Android Native Plugin manages manifest automaticaly. Read more.


Android Native plugin should be the main activity. so this is very important lines that you should have in your new merged manifest

<activity android:name="com.androidnative.AndroidNativeBridge" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:launchMode="singleTask" android:screenOrientation="landscape">


       <action android:name="android.intent.action.MAIN" />

       <category android:name="android.intent.category.LAUNCHER" />


. . . . . .



If in the  manifest you have in your project  you see that another custom activity wants to be the main, you probably need to merget to plugins together, Here is usefull info:

Can I use this plugin with other Android Plugins from Asset Store

How to compile androidnative.jar from eclipse project


Some of plugin feature also may have dependencies from manifest. That’s why AndroidManifest you got with the plugin contains markers in manifest like this:

<!-- Google Mobile Ad Block Start -->
   <activity android:name="" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<!-- Block End -->

<!-- Facebook Block Start -->      
   <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 395891937214418" />
       android:theme="@android:style/Theme.Translucent.NoTitleBar" />
   <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
   <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true">
<!-- Block End -->


So for example  if you want to use the Google Mobile Ad feature, you need to transfer all Google Mobile Ad blocks to your updated manifest.