How to merge these 2 parts of 2 conflicting manifest files

I have 2 plugins that I can’t get to work together. I’ve copied over the activities from the one that weren’t in the other, but then I have a problem with both of them using the same intent-filter:

<intent-filter>
					<action android:name="android.intent.action.MAIN" />
					<category android:name="android.intent.category.LAUNCHER" />
				</intent-filter>

which is part of an activity in both Manifest files…

In the combined manifest, whichever of the 2 activities is on top is the plugin that will work. But not both at the same time…

The 2 activities I need to combine are:
ACTIVITY #1:

<activity android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity" android:label="@string/app_name" android:screenOrientation="portrait" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>

ACTIVITY #2:

<activity
			android:name="com.devfo.andutils.DevfoUnityPlayerActivity"
			android:label="@string/app_name"
			android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
			android:screenOrientation="portrait">
				<intent-filter>
					<action android:name="android.intent.action.MAIN" />
					<category android:name="android.intent.category.LAUNCHER" />
				</intent-filter>
		</activity>

So if I have ACTIVITY #1 above ACTIVITY #2 in the manifest, plugin #1 will work but not #2 and vice versa.

Hey !!

M having same problem with vuforia and Bluetooth Android Plugins !

Did u find any work around ?

Hi,

The Activity that has the intent filter would be the first activity to be started when you launch your app.
There can’t be 2 ‘first’ right?

Therefore, you should decide on the first activity that you want your app to launch with and leave the other for later.
When your app has launched, you can then start the second activity that you omitted the intent filter.

This is just a suggestion and not really sure if it works, but you can try:

//Get the 2nd activity that you omitted the intent filter
AndroidJavaClass jc = new AndroidJavaClass ( activity_name_here );
//Call the method to start the activity, you may need to fiddle around and get the Init method for the activity thou…
jc.CallStatic (method_name, parameter);

If you need Unity’s activity as a context/activity :

//Get Unity’s Current Activity
AndroidJavaClass unityClass = new AndroidJavaClass (“com.unity3d.player.UnityPlayer”);
AndroidJavaObject unityActivity = unityClass.GetStatic(“currentActivity”);

Kennethljj is close to the correct answer. You can’t have 2 activities with the same intent of action MAIN and category LAUNCHER. Doing so will give you two application icons, and it is pretty certain that they behavior is NOT what you want.

Typically you are “overriding” the UnityAndroidPlayer (or UnityAndroidNativePlayer). If another plugin has already created a manifest that enables their jar file to extend the Unity AndroidPlayer, then you should modify your plugin to extend THAT class (in your case it looks like QCARPlayerProxyActivity) adding the path to the plugin’s jar file to your classpath when you build your jar file. Then, in the AndroidManifext.xml file, delete the intent-filter for the QCARPlayerProxyActivity, and instead have that intent-filter for your class which now extends that class.

= Ed =

I’m having problems getting vuforia to work with any of the native and social plugins because of this problem. I downloaded eclipse and am trying to figure it out. If anyone has experience can can make an example and hopefully comment it so I can learn how to do it for the future, I’m happy to pay money…

I made a paid post here: http://forum.unity3d.com/threads/234292-Need-native-android-plugin-made?p=1555343#post1555343 I really need to get this worked out…

having the same problem here with the DEVFO Native Android Plugin and another one.
can’t get both running because they’re using the main activitiy.

@Imbarns did you get any working solution?

Hi,
If anyone is still in need of making the Devfo NativeAndroid plugin work with Prime31, we have built the Devfo Plugin to incorporate Prime 31, using their Android Activity Sharing – Instructions to make a plugin that needs to override the Unity Activity play nice with others. · GitHub
Just contact us with your receipt# and we will email it to you. We should hopefully have it in the next Asset Store release.

thanks
Bob,
Devfo