Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11252

Android: Entries in tiapp.xml do not replace stock values in generated AndroidManifest.xml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Invalid
    • Affects Version/s: Release 2.1.2, Release 2.1.3, Release 3.0.0
    • Component/s: Android, Tooling
    • Labels:
    • Environment:

      SDKs tested: 2.1.2.GA, 2.1.3.v20120927181611, 3.0.0.v20121002103353
      Devices tested: Galaxy Nexus 4.0.4, Droid (original) 2.2.3

      Description

      Android manifest changes in the tiapp.xml file do not replace the "stock" manifest entries created by the build process. Instead, the stock entries are copied after the custom entries, overriding the customizations.

      Steps to reproduce

      1. Create a default Ti project targeting Android
      2. Build the app (for emulator or device, doesn't matter)
      3. Open tiapp.xml, view the XML source
      4. Change the <android tag to be container tags and add manifest tags, like this:

            <android xmlns:android="http://schemas.android.com/apk/res/android">
            	<manifest>
            	</manifest>
            </android>
        

      5. Open <project>/builds/android/AndroidManifest.xml and copy the <activity> and <service> tags that follow the <!-- TI_APPLICATION --> comment
      6. Paste the copied text into the tiapp.xml between the <manifest></manifest> tags
      7. Edit the pasted in code to remove |orientation from each of the <activity configChanges"> attributes
      8. To each of those tags, add android:screenOrientation="portrait" to force portrait orientation in the app
      9. Save and build the app
      10. Open <project>/builds/android/AndroidManifest.xml. It will have both your customized entries followed by the generated stock entries. As a result, the app will display in both portrait and landscape orientation.

      Expected results

      Changes in tiapp.xml would override the stock/generated AndroidManifest.xml values

      Actual results

      Stock/generated AndroidManifest values pasted in after custom entries, negating the effect of the custom entries.

      This is likely a regression as it used to work properly. The tiapp.xml customization technique is taught in the ATMD training course.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ayeung Allen Yeung
                Reporter:
                skypanther Tim Poulsen
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-14526
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration