Search Unity

Merging AndroidManifest

Discussion in 'Scripting' started by mediumTaj, Jun 25, 2015.

  1. mediumTaj

    mediumTaj

    Joined:
    Feb 20, 2015
    Posts:
    28
    Can anybody give me any pointers in merging these two android manifest files? Oculus SDK and Common Android Functionalities. This is driving me crazy! Thanks in advance!

    Code (XML):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="codx.unity.commons" >
    3.     <!--    VIBRATE is needed only if your game uses the functions related to the vibrator, otherwise you can remove it or include it in this comment    -->
    4.     <uses-permission android:name="android.permission.VIBRATE" />
    5.     <!--    CAMERA and FLASHLIGHT permissions are needed only if your game uses the flashlight or take picture functions (both of them are needed), otherwise you can remove them or include them in this comment     -->
    6.     <uses-permission android:name="android.permission.CAMERA" />
    7.     <uses-permission android:name="android.permission.FLASHLIGHT" />
    8.     <!--     INTERNET is needed either if your game uses internet or geo-localization functions, otherwise you can remove it or include it in this comment    -->
    9.     <uses-permission android:name="android.permission.INTERNET" />
    10.     <!--    ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION and ACCESS_MOCK_LOCATION are needed only if your game uses geo-localization functions, otherwise you can remove them or include them in this comment    -->
    11.     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    12.     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    13.     <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
    14.     <!--     The camera.flash feature is declared for letting know the system that your app will use the flash led. It's reccomended to keep this declaration (since it's declared as not required so it doesn't filter the device support of your game)    -->
    15.     <uses-feature android:name="android.hardware.camera.flash" android:required="false" />
    16.     <!--     Don't touch what follows if you don't know what you're doing or if you want to do some experiment make a backup of this file to be sure you cen revert to the orignal version in case of chrashes    -->
    17.     <application android:icon="@drawable/app_icon" android:label="@string/app_name" name="codx.unity.commons.CommonsApplicationInits" >
    18.         <!--    This activity goes to replace and extend the original Unity player    -->
    19.         <activity android:name="codx.unity.commons.OverriddenPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    20.             <intent-filter>
    21.                 <action android:name="android.intent.action.MAIN" />
    22.                 <category android:name="android.intent.category.LAUNCHER" />
    23.             </intent-filter>
    24.         </activity>
    25.         <!--    This activity is declared to allow AndroidCommons.OpenDirectory() to show the directory tree    -->
    26.         <activity android:name="codx.unity.commons.BrowseDirectory" android:label="@string/app_name" android:uiOptions="splitActionBarWhenNarrow" >
    27.         </activity>
    28.     </application>
    29. </manifest>
    30.  

    Code (XML):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.Oculus.Integration" android:versionName="1.0.0" android:versionCode="1">
    3.   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    4.   <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:debuggable="false">
    5.     <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
    6.     <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="screenSize|orientation|keyboardHidden|keyboard">
    7.       <intent-filter>
    8.         <action android:name="android.intent.action.MAIN" />
    9.         <category android:name="android.intent.category.LAUNCHER" />
    10.       </intent-filter>
    11.       <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    12.       <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    13.     </activity>
    14.   </application>
    15.   <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
    16.   <uses-feature android:glEsVersion="0x00030000" />
    17.   <uses-permission android:name="android.permission.INTERNET" />
    18.   <uses-permission android:name="android.permission.WAKE_LOCK" />
    19.   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    20. </manifest>
     
  2. mediumTaj

    mediumTaj

    Joined:
    Feb 20, 2015
    Posts:
    28
  3. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    I had thought Unity would merge any manifests files it found automagically. I might be wrong though, but then again I didn't have to modify any manifests file last time I imported admob, and then built out - unity just seemed to do it for me?
     
  4. mediumTaj

    mediumTaj

    Joined:
    Feb 20, 2015
    Posts:
    28
    I don't think it merged the plugin manifests... it would just overwrite them whenever I imported a new plugin. I wish it would merge them automatically!