galaxyacetype0 galaxyacetype0 - 2 months ago 9
Android Question

Merging Android Manifest

Hi I made an android game which uses googleadmob. I have decided to port it to amazon app store as well and use game circle. They both have their own android manifests so this creates an error when building. How can I combine the abmob manifest into the game circle one. Please advise as i do not know xml!

Admob Manifest

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.example.admobtest" android:versionName="1.0" android:versionCode="1">

<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />

<!-- Google Mobile Ads Permissions -->

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">

<!-- meta-data tag for Google Play services -->

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

<activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>

<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

</activity>

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

<meta-data android:name="android.app.lib_name" android:value="unity" />

</activity>

<activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

</activity>

<!-- Google Mobile Ads Activity -->

<activity android:name="com.google.android.gms.ads.AdActivity"

android:label="@string/app_name"

android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

</activity>

</application>

<uses-feature android:glEsVersion="0x00020000" />

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />

</manifest>


Game Circle Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amazon.gamecircle"
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:icon="@drawable/app_icon"

android:label="@string/app_name"

android:debuggable="true">


<!-- Unity Activities -->

<activity android:name="com.unity3d.player.UnityPlayerProxyActivity"

android:label="@string/app_name"

android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>

<activity android:name="com.unity3d.player.UnityPlayerActivity"

android:label="@string/app_name"

android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

</activity>

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity"

android:label="@string/app_name"

android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

<meta-data android:name="android.app.lib_name" android:value="unity" />

<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />

</activity>

<activity android:name="com.unity3d.player.VideoPlayer"

android:label="@string/app_name"

android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

</activity>

<!-- GameCircle Dependencies -->

<receiver android:name="com.amazon.inapp.purchasing.ResponseReceiver">

<intent-filter>

<action android:name="com.amazon.inapp.purchasing.NOTIFY" android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" />

</intent-filter>

</receiver>

<activity

android:name="com.amazon.ags.html5.overlay.GameCircleUserInterface"

android:theme="@style/GCOverlay" >

</activity>

<activity

android:name="com.amazon.identity.auth.device.authorization.AuthorizationActivity"
android:allowTaskReparenting="true"

android:launchMode="singleTask"

android:theme="@android:style/Theme.NoDisplay" >

<intent-filter>

<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />

<category android:name="android.intent.category.BROWSABLE" />

<data

android:host="bundle id here"

android:scheme="amzn" />

</intent-filter>

</activity>

<receiver

android:name="com.amazon.identity.auth.device.authorization.PackageIntentReceiver"
android:enabled="true" >

<intent-filter>

<action android:name="android.intent.action.PACKAGE_INSTALL" />

<action android:name="android.intent.action.PACKAGE_ADDED" />

<data android:scheme="package" />

</intent-filter>

</receiver>

<!-- META-DATA -->

</application>

<!-- PERMISSIONS -->

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

</manifest>

Answer

Your merged manifest something look like this,

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
android:installLocation="preferExternal" 
package="com.example.admobtest" 
android:versionName="1.0" android:versionCode="1">

<uses-sdk android:minSdkVersion="9" 
android:targetSdkVersion="19" />

 <!-- Google Mobile Ads Permissions -->

 <uses-permission android:name="android.permission.INTERNET" />

 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-feature android:glEsVersion="0x00020000" />

<supports-screens

    android:smallScreens="true"

    android:normalScreens="true"

    android:largeScreens="true"

    android:xlargeScreens="true"

    android:anyDensity="true"/>

    <!-- Google Mobile Ads Permissions -->

   <uses-permission android:name="android.permission.INTERNET" />

   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

   <application 
   android:icon="@drawable/app_icon" 
   android:label="@string/app_name" 
   android:debuggable="false">

<!-- meta-data tag for Google Play services -->

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

<activity android:name="com.unity3d.player.UnityPlayerProxyActivity" 
android:label="@string/app_name" 
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

  <intent-filter>

    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />

  </intent-filter>

</activity>

<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

</activity>

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

</activity>

<activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >

</activity>

<!-- Google Mobile Ads Activity -->

  <activity android:name="com.google.android.gms.ads.AdActivity"

          android:label="@string/app_name"

          android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">

</activity>

 <activity

        android:name="com.amazon.ags.html5.overlay.GameCircleUserInterface"

        android:theme="@style/GCOverlay" >

    </activity>

    <!-- GameCircle Dependencies -->

    <receiver android:name="com.amazon.inapp.purchasing.ResponseReceiver">

    <intent-filter>

    <action android:name="com.amazon.inapp.purchasing.NOTIFY" android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" />

    </intent-filter>

    </receiver>

      <activity

        android:name="com.amazon.identity.auth.device.authorization.AuthorizationActivity"
        android:allowTaskReparenting="true"

        android:launchMode="singleTask"

        android:theme="@android:style/Theme.NoDisplay" >

        <intent-filter>

            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />

            <category android:name="android.intent.category.BROWSABLE" />

            <data

                android:host="bundle id here"

                android:scheme="amzn" />

        </intent-filter>

    </activity>

    <receiver

        android:name="com.amazon.identity.auth.device.authorization.PackageIntentReceiver"
        android:enabled="true" >

        <intent-filter>

            <action android:name="android.intent.action.PACKAGE_INSTALL" />

            <action android:name="android.intent.action.PACKAGE_ADDED" />

            <data android:scheme="package" />

        </intent-filter>

    </receiver>
    </application>

    </manifest>
Comments