Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to set a Qt app for Android as a Launcher?
Forum Update on Monday, May 27th 2025

How to set a Qt app for Android as a Launcher?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 5 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • a.burksA Offline
    a.burksA Offline
    a.burks
    wrote on last edited by
    #1

    Creating a Qt and QML app for Android is very convenient with Qt Creator. It’s perfect for quick prototypes. Is it also possible to setup a Qt app as an Android Launcher. I have realized, that Qt Creator creates the Android project structure in the build directory, that includes the AndroidManifest.xml file.

    In Android Studio it’s quite simple to setup an app as a launcher by a small modification for the intend filter:

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.HOME" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
    

    Can I configure my Qt project in a way, that modifies this intend filter?

    Pablo J. RoginaP 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, you can generate the AndroidManifest.xml for your project within the sources. You can then modify it the way you want it.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      a.burksA 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        AFAIK, you can generate the AndroidManifest.xml for your project within the sources. You can then modify it the way you want it.

        a.burksA Offline
        a.burksA Offline
        a.burks
        wrote on last edited by
        #3

        @sgaist Thanks for your reply. Sounds promising. How can I set up a manifest file? I had a look at the Qt Notifier example project. I assume the following parts of the .pro file are relevant I have to add to my .pro file:

        QT += quick androidextras
        ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
        OTHER_FILES += \
           android-sources/AndroidManifest.xml
        

        A have also seen, that Qt Creator is able to parse the manifest file and display a form. Here I can define the app name and app icon. Very useful. However the form doesn’t allow to edit the activity and intent filter. So I have to open the text editor.

        Do you have a suggestion how to create a manifest file? I may take the one, that is automatically created during the build process of my project?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          See the Editing Manifest File section in the Android deployment part of the Qt Creator documentation.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          a.burksA 1 Reply Last reply
          1
          • SGaistS SGaist

            See the Editing Manifest File section in the Android deployment part of the Qt Creator documentation.

            a.burksA Offline
            a.burksA Offline
            a.burks
            wrote on last edited by
            #5

            @sgaist Perfect. This works. Thanks

            J.HilkJ 1 Reply Last reply
            1
            • a.burksA a.burks

              @sgaist Perfect. This works. Thanks

              J.HilkJ Online
              J.HilkJ Online
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @a-burks great that it works for you, don't forget to use the topic tools to set the topic to solved 😉


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              a.burksA 1 Reply Last reply
              0
              • J.HilkJ J.Hilk

                @a-burks great that it works for you, don't forget to use the topic tools to set the topic to solved 😉

                a.burksA Offline
                a.burksA Offline
                a.burks
                wrote on last edited by
                #7

                @j-hilk Thanks. I'll do. I just have to test editing the Manifest file to define the app as a launcher. I realized, that I have to switch from the form view to the text view of this file in Qt Creator.

                1 Reply Last reply
                0
                • a.burksA a.burks

                  Creating a Qt and QML app for Android is very convenient with Qt Creator. It’s perfect for quick prototypes. Is it also possible to setup a Qt app as an Android Launcher. I have realized, that Qt Creator creates the Android project structure in the build directory, that includes the AndroidManifest.xml file.

                  In Android Studio it’s quite simple to setup an app as a launcher by a small modification for the intend filter:

                  <intent-filter>
                      <action android:name="android.intent.action.MAIN" />
                      <category android:name="android.intent.category.HOME" />
                      <category android:name="android.intent.category.DEFAULT" />
                  </intent-filter>
                  

                  Can I configure my Qt project in a way, that modifies this intend filter?

                  Pablo J. RoginaP Offline
                  Pablo J. RoginaP Offline
                  Pablo J. Rogina
                  wrote on last edited by
                  #8
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bassoudilus
                    wrote on last edited by
                    #9

                    Hi All,

                    I'm also new to this topic,

                    I used the same intent defintion in androidmanifest xml file but Android is not considering my app to be a launcher app (nothing happens when I press on home button)

                        <activity android:name="org.qtproject.qt.android.bindings.QtActivity" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:label="-- %%INSERT_APP_NAME%% --" android:launchMode="singleApp" android:screenOrientation="unspecified" android:exported="true">
                            <intent-filter>
                                <action android:name="android.intent.action.MAIN"/>
                                <category android:name="android.intent.category.HOME"/>
                                <category android:name="android.intent.category.DEFAULT"/>
                            </intent-filter>
                            <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
                            <meta-data android:name="android.app.arguments" android:value="-- %%INSERT_APP_ARGUMENTS%% --"/>
                            <meta-data android:name="android.app.extract_android_style" android:value="minimal"/>
                        </activity>
                        <provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.qtprovider" android:exported="false" android:grantUriPermissions="true">
                            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/qtprovider_paths"/>
                        </provider>
                    </application>
                    
                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved