Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-3470

Android: timodule.xml contents do not get copied into generated AndroidManifest.xml

    Details

      Description

      {html}<div><p>The timodule.xml contents do not get added to the generated
      AndroidManifest.xml at build time. This is happening in Master.</p></div>{html}

        Issue Links

          Activity

          Show
          Bill Dawson added a comment - - edited https://github.com/appcelerator/titanium_mobile/commit/4a487322088deb07bd8f305afdde5451a1e6749e
          Hide
          Bill Dawson added a comment -

          I believe this is just a misunderstanding caused by the template timodule.xml not getting updated after we settled on our standard for putting the <android> section into tiapp.xml (somewhere around 1.5.0, probably). So the entries in timodule.xml should be structured the same way entries in tiapp.xml are. But the comment inside the template timodule.xml shows the manifest element looking like this: <android:manifest>, which is wrong. So perhaps the customer was following that wrong advice and thus it wasn't working.

          Instead the section should look just like it would in a tiapp.xml:

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

          If it's done that way, it already works (I didn't need to make any programming changes, though I did update timodule.xml template to reflect this.)

          If QA wants to test this:

          • Create a new Android module or use an existing Android module.
          • Open the module's timodule.xml file and change the <android> section to look like this:
          timodule.xml
          <android xmlns:android="http://schemas.android.com/apk/res/android">
              <manifest>
                  <uses-permission android:name="android.permission.READ_CONTACTS"/>
              </manifest>
          </android>
          
          • Build the module.
          • Copy the packaged module ZIP file to a Titanium Mobile project's root folder.
          • In the Titanium Mobile project's tiapp.xml file, be sure to add the <module> section to specify that the module should be used in the project.
          • Build the Titanium Mobile project.
          • Open build/android/AndroidManifest.xml and go down near the bottom, and you should see the READ_CONTACTS permission in there – that came from the timodule.xml
          Show
          Bill Dawson added a comment - I believe this is just a misunderstanding caused by the template timodule.xml not getting updated after we settled on our standard for putting the <android> section into tiapp.xml (somewhere around 1.5.0, probably). So the entries in timodule.xml should be structured the same way entries in tiapp.xml are. But the comment inside the template timodule.xml shows the manifest element looking like this: <android:manifest> , which is wrong. So perhaps the customer was following that wrong advice and thus it wasn't working. Instead the section should look just like it would in a tiapp.xml: tiapp_or_timodule.xml <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> </manifest> </android> If it's done that way, it already works (I didn't need to make any programming changes, though I did update timodule.xml template to reflect this.) If QA wants to test this: Create a new Android module or use an existing Android module. Open the module's timodule.xml file and change the <android> section to look like this: timodule.xml <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <uses-permission android:name="android.permission.READ_CONTACTS"/> </manifest> </android> Build the module. Copy the packaged module ZIP file to a Titanium Mobile project's root folder. In the Titanium Mobile project's tiapp.xml file, be sure to add the <module> section to specify that the module should be used in the project. Build the Titanium Mobile project. Open build/android/AndroidManifest.xml and go down near the bottom, and you should see the READ_CONTACTS permission in there – that came from the timodule.xml
          Hide
          Don Thorp added a comment -

          Device not needed for testing.

          Show
          Don Thorp added a comment - Device not needed for testing.

            People

            • Assignee:
              Bill Dawson
              Reporter:
              ctredway
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development