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


    • 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


      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">

      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.


          Issue Links



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


                • Created:

                  Backbone Issue Sync

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

                    Git Integration