Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23872] Enable android.mergeCustomAndroidManifest by default

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-09-07T03:31:55.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsAndroid, Tooling
Labelscb-tooling
ReporterChris Barber
AssigneeChris Barber
Created2016-09-06T22:16:14.000+0000
Updated2016-09-09T22:35:48.000+0000

Description

When the Android build was rewritten for Node.js, a flaw was purposely ported from the old Python code. For iOS, <plist> overrides a custom Info.plist and a custom Info.plist overrides the default Info.plst. However with Android, if a custom AndroidManifest.xml is present, the <manifest> section of the tiapp.xml does NOT override the custom AndroidManifest.xml by default. To enable this behavior, you must set ti config android.mergeCustomAndroidManifest true. We should set this flag to true so that Android's behavior is in parity with iOS.

Comments

  1. Chris Barber 2016-09-07

    Ti SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8320 Ti SDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8321
  2. Chris Barber 2016-09-07

    To test:

    Create a new Titanium app

    Create platform/android in the project dir

    Build the app for Android... you can do a build-only build

    Copy build/android/AndroidManifest.xml into platform/android

    Edit the tiapp.xml and set the following in the <android> section:

       <manifest>
       	<uses-sdk android:minSdkVersion="16" />
       </manifest>
       

    Build the app again and verify that the minSdkVersion in the build/android/AndroidManifest.xml is correct

    * Before the fix, it will not merge the minSdkVersion unless the Titanium CLI config contains android.mergeCustomAndroidManifest is set to true * After the fix, it will always override the custom AndroidManifest.xml just like the Info.plist for iOS
  3. Chee Kiat Ng 2016-09-07

    CR and FT passed. PRs merged.
  4. Lokesh Choudhary 2016-09-09

    Verified the fix. The AndroidManifest.xml gets overidden by tiapp.xml successfully. Closing. Environment: Appc Studio : 4.8.0.201609061702 Ti SDK : 6.0.0.v20160909001132 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.8-6 Appc CLI : 6.0.0-38 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source