# Add category to intent-filter into AndroidManifest.xml

**URL:** <https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928>\
**Category:** Mobile\
**Tags:** Android-Packaging, unreal-engine, editor, UE4, question\
**Created:** [November 28, 2015, 12:31pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928 "2015-11-28T12:31:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [November 28, 2015, 12:31pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/1 "2015-11-28T12:31:36Z")

</div>

Hi, I need to add a `category` item into `intent-filter` of `activity` section.

I couldn’t do it through Editor. I suppose it’s impossible now, so can I suggest it for next release?

And how to workaround it for now?

Thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [December 4, 2015, 4:19pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/2 "2015-12-04T16:19:25Z")

</div>

Hello MorskoyZmey,

Could you elaborate further on what it is exactly that you are requesting and could you provide a detailed example of the functionality for the feature that is being requested?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [December 7, 2015, 4:31pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/3 "2015-12-07T16:31:29Z")

</div>

Hello MorskoyZmey,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [December 10, 2015, 8:18pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/4 "2015-12-10T20:18:44Z")

</div>

Answering your comment:

![70129-2015-12-11+01-15-52+androidmanifest.xml+-+google+chrome.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/c/42cb5e7d09cce896c2e4c86018da7c7455ddf621.png)

Ability to add selected category I mean as proposed functionality

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [December 11, 2015, 6:06pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/5 "2015-12-11T18:06:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4e46d533](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4e46d533](https://forums.unrealengine.com/u/anonymous_user_4e46d533)\
**Post date:** [January 26, 2016, 4:03am UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/6 "2016-01-26T04:03:58Z")

</div>

Hi Chris,  
Is there any documentation on the APL.xml that would show all the possible additions or updates that could be made?

Thanks

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [January 26, 2016, 5:27pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/7 "2016-01-26T17:27:14Z")

</div>

The best documentation at the moment is the comment block I wrote at the top of AndroidPluginLanguage.cs. GearVR\_APL.xml also shows some of the ways the manifest may be manipulated.

There are commands for making new elements, inserting them, walking them and adding/removing attributes, etc.

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [March 30, 2016, 11:28am UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/8 "2016-03-30T11:28:01Z")

</div>

Hi, thank you, this system is very useful!  
Could you clarify one moment: is insert template system universal?  
I mean, can be the code `//$${gameActivityMyOwn}$$` processed in APL.xml?

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [March 30, 2016, 5:46pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/9 "2016-03-30T17:46:00Z")

</div>

No. I have code in UEDeployAndroid.cs for each of the sections in UpdateGameActivity(). You can add your own here but it will only be for your engine build. Did I miss a section that should be exposed?

---

<div class="post-metadata">

**Author:** ![virtualHC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/virtualhc/32/1194710_2.png) [@virtualHC](https://forums.unrealengine.com/u/virtualHC)\
**Post date:** [February 17, 2018, 5:25am UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/10 "2018-02-17T05:25:14Z")

</div>

In 4.19 I now get this warning:

```
'UnrealBuildTool.ModuleRules.ReceiptPropertyList.Add(UnrealBuildTool.ReceiptProperty)' is obsolete: 'Constructing a ReceiptProperty object is deprecated. Call RuntimeDependencies.Add() with the path to the file to stage.'

```

What is the correct syntax now for adding an “AndroidPlugin” APL.xml Receipt Property using RuntimeDependencies?

---

<div class="post-metadata">

**Author:** ![SHAINPAIN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SHAINPAIN](https://forums.unrealengine.com/u/SHAINPAIN)\
**Post date:** [June 26, 2018, 3:33pm UTC](https://forums.unrealengine.com/t/add-category-to-intent-filter-into-androidmanifest-xml/339928/11 "2018-06-26T15:33:05Z")

</div>

I also need to add/edit what is in the intent filter section of the activity. I’m trying to package and upload to the oculus store, and have followed all of their steps for packaging but receive this error:

APK main activity intent filter set to com.google.intent.category.CARDBOARD, but must be android.intent.category.INFO. Your app must only appear in Oculus Home. It must not appear in the phone’s launcher.

Now the answers posted below are several years and versions old so if you had any advice for me I would greatly appreciate it.
