- Home /
AndroidManifest.xml versus AndroidManifest-main.xml in Temp/StagingArea
What exactly is the difference between AndroidManifest.xml and AndroidManifest-main.xml in the Temp/StagingArea
directory? To help guide this question, assume that I am building a project without a Plugins/Android
directory into an Android APK. But, I wish to copy a version of an Android Manifest XML file so I can customize it (ie, add in more permissions to the file). Which file should I be copying/modifying from the defaults created in Temp/StagingArea
?
Answer by HenryStrattonFW · Feb 10, 2017 at 09:21 PM
You can find the default manifest in the Unity installation files, the path will be different depending on your installation location/version but for example mine is C:\ProgramFiles\Unity_5.5.0\Editor\Data\PlaybackEngines\AndroidPlayer\Apk
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<application
android:theme="@style/UnityThemeSelector"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>
</manifest>
Answer by PAHeartBeat · Feb 11, 2017 at 09:35 AM
Hi @MophVGX
May this might help you.
AndroidManifest.xml in "Temp/StaginArea" or "/Applications/Unity v5.5.1p1/PlaybackEngines/AndroidPlayer/Apk" is predefine Manifest used when developer not add it;s own Manifest in Plugins/Android folder. plus customise as per point 3
if developer added it's own Manifest in "Plugins/Android" Unity used that manifest for identify which activity, service ase used by game, plus make little customise as per point 3
It will little customise automatic for few permission like write external storage, Graphic API uses (OpenGLES 1.x / 2.x / 3.x) , bundle id, version and version code as per Player Setting we setup.
If you want to customise permission and few more thing for your game, then your Manifest must has at-least those items or definition maintain in "/Applications/Unity v5.5.1p1/PlaybackEngines/AndroidPlayer/Apk"
~Thanks Ranpariya Ankur {PAHeartBeat}
Your answer
Follow this Question
Related Questions
my android build is of 29mb but when i install it ,size become 50mb in device 0 Answers
[URGENT!]Android Manifest file keeps reverting changes after build! 0 Answers
Disable permission requests 0 Answers
APK size question 0 Answers
Wake lock for android 2 Answers