Add category to intent-filter into AndroidManifest.xml

It is possible to do this in 4.10 using the android plugin system work I did. Any module has the ability to add an AdditionalProperties ReceiptProperty type of AndroidPlugin and provide the path to an APL.xml file:

			if (Target.Platform == UnrealTargetPlatform.Android)
			{
				string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
				AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "MyAdditions_APL.xml")));
			}

Add the above to your Build.cs and put a MyAdditions_APL.xml in the same directory. The APL.xml can make changes to the AndroidManifest.xml as part of the packaging step. Here is an example MyAdditions_APL.xml which would add your intent:

<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
	<!-- init section is always evaluated once per architecture -->
	<init>
		<log text="MyAdditions init"/>
	</init>

	<!-- optional updates applied to AndroidManifest.xml -->
	<androidManifestUpdates>
		<!-- update the GameActivity activity -->
		<loopElements tag="activity">
			<setStringFromAttribute result="activityName" tag="$" name="android:name"/>
			<setBoolIsEqual result="bGameActivity" arg1="$S(activityName)" arg2="com.epicgames.ue4.GameActivity"/>
			<if condition="bGameActivity">
				<true>
					<!-- add my category to intent-filter -->
					<setElement result="intentInfo" value="category"/>
					<addAttribute tag="$intentInfo" name="android:name" value="com.nuitrack.intent.category.VICOVR"/>
					<addElement tag="intent-filter" name="intentInfo"/>
				</true>
			</if>
		</loopElements>
	</androidManifestUpdates>
</root>

What the above does is look for the com.epicgames.ue4.GameActivity element, create a category element and add the attribute, then insert it in the element.

If you aren’t using a code project, you can just add an empty class and it should create a build.cs for your project in the Source directory you can add these to.