Any way to edit the AndroidManifest.xml Manually?

As the topic title says, is there any way I can edit the AndroidManifest.xml Manually?

I think you can make changes to the manifest by browsing [your project folder] -> [intermediate] -> [Android] -> [APK]

Yes that is possible and pretty straigth forward, but you need to build UE4 from source. The AndroidManifest.xml is not created from a file template or something like that - you need to make changes in the AndroidManifest.xml generator code, that processes all your settings and builds your custom AndroidManifest.xml.

In the file Engine/Surce/Programs/UnrealBuildTool/Android/UEDeployAndroid.cs find the GenerateManifest function. The beginning of the manifest generation there looks like this:



StringBuilder Text = new StringBuilder();
Text.AppendLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
Text.AppendLine("<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"");
Text.AppendLine(string.Format("          package=\"{0}\"", PackageName));
if (ExtraManifestNodeTags != null)
    foreach (string Line in ExtraManifestNodeTags)
    {
        Text.AppendLine("          " + Line);
    }
}
Text.AppendLine(string.Format("          android:versionCode=\"{0}\"", StoreVersion));
Text.AppendLine(string.Format("          android:versionName=\"{0}\">", VersionDisplayName));

// ... and so on ...


Now, scoll down and follow the AndroidManifest.xml generation line by line, until you find the right place for your change and code it in. You could even create your own .ini file entries to make your changes even more flexible. But that is another story. Take a look at the code in that file, it shows best what you want to know and need to do.

Have fun!

Thanks MarcelBlanck Ill have too look into his then.

Hi KillerSneak,

You can add to most of the sections of the AndroidManifest.xml by using the Android Project Settings. The tooltips will show how to do this either in the editbox or by creating text files in your project’s Build/Android directory. The requirements (containing permissions and features) may be added to, or completely overridden if needed.

If you really need to do a complete replacement of the manifest you’d need to to do as suggested above and make changes to GenerateManifest in UEDeployAndroid.cs.

The project manager is actually very limited and doesn’t allow adding

parts, this way the project manager doesn’t allow you to optimize your project for tablet use, only way to circumvent this now is to use the **ManifestRequirementsOverride.txt

**I haven’t used/don’t know C++ at all but it seems to me it’s getting mandatory if you want to include social features into your project as nothing Facebook/Steam etc wise is exposed in blueprints at this moment.

Yes, ManifestRequirementsOverride.txt is the way to add uses-feature at the moment. We are planning to add the social features as plugins after the plugin system is updated to allow registering of files to stage and additions to make to the manifest when enabled.

Thanks for the response I think for mobile game development this is a must and should be a feature that get’s priority above all the GFX related engine features (imho)

This

https://answers.unrealengine.com/questions/796660/how-do-i-override-androidicon-tags-in-application.html