Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28024

AndroidManifest editor corrupts <service> elements

    XMLWordPrintable

Details

    • 9eb3cb1ac (master)

    Description

      Steps to reproduce

      1. Open the "Native Android Service in Same Process" example (https://doc.qt.io/qt-5/qtandroidextras-services-servicesameprocess-example.html )
      2. Inspect the project's AndroidManifest.xml file with a text editor
      3. Use the Qt Creator GUI to open AndroidManifest.xml, make a simple change to the Package Name (for example "org.qtproject.example.qtandroidservice" -> "org.qtproject.example.qtandroidservices"), and save it
      4. Repeat Step #2

       

      Result

      At Step #2, the manifest contains this:

      <service android:name=".QtAndroidService">
          <!-- Background running -->
          <meta-data android:name="android.app.background_running" android:value="true"/>
          <!-- Background running -->
      </service>
      

       

      At Step #4, the above has been corrupted to this:

      <service android:name=".QtAndroidService">
          <!-- Background running -->
          <meta-data android:name="android.app.background_running" android:value="true"/>
          <!-- Background running -->
          <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
      </service>
      

       

      A more complex example

      Data can even be deleted. The Firebase service declaration (https://firebase.google.com/docs/cloud-messaging/android/client ) gets turned from this...

      <service
          android:name=".java.MyFirebaseMessagingService"
          android:exported="false">
          <intent-filter>
          <action android:name="com.google.firebase.MESSAGING_EVENT" />
          </intent-filter>
      </service>
      

      ...to this:

      <service android:name=".java.MyFirebaseMessagingService">
          <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
      </service>
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              portale Alessandro Portale
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes