Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132552

Qt app set as android home launcher stops working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 6.5.3, 6.8.1, 6.9.0
    • QPA: Android
    • None
    • Android
    • 2025wk08s1QtforAndroid, 2025wk12s1QtforAndroid

    Description

      Hi all,

      another thing I noticed while porting my app from Qt5 to Qt6 is that it's not really possible to have Qt app as android home launcher anymore

      Attached simplest example:

      Steps to reproduce:

      1. create a new QtQuick application using QtCreator
      2. copy Android templates to android directory, most notably AndroidManifest.xml
      3. add relevant properties to CMakeList.txt as QtCreator has bug so it doesn't do it automatically
      4. modify AndroidManifest.xml so that app can be used as launcher by replacing category.LAUNCHER with:
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.HOME"/>
      1. run the app using QtCreator
      2. app runs as expected (screenshot attached)
      3. set app as home launcher by pressing Home button and selecting activity (once or always it's the same for this case) or by setting it as Home launcher in Settings
      4. app runs but it breaks with showing just blank screen - screenshot attached

      On Qt5, Native Android or Flutter equivalent AndroidManifest.xml works as expected.

      The "fix" for Qt6 is to change android:exported to "false" for main activity in AndroidManifest.xml which prevents it from being launched by another activity (QtCreator as well) but it works when set as home launcher. Not sure what else that breaks but from my perspective it seems as if there are two activities if that makes sense.

       

       

      Attachments

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

        Activity

          People

            jani-korteniemi Jani Korteniemi
            pkoretic Petar Koretic
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes