The basis of this approach is to offer Qt QML APIs in an embedded way so that the app will remain a relatively typical Android app. This approach offers a more standard Android-centered approach at the cost of leveraging the cross-platform nature of a Qt application. It's best suited for adding desirable Qt features to an existing Android application.
The most prominent difference between these approaches is the project structure. Qt for Android applications are CMake projects that can be built for Android or other platforms, while a Qt Quick for Android Project is an Android project that includes QML content and can only be built for Android.
The main objective of the Qt for Android approach is to let Qt handle most of the work of the architecture and boilerplate code of the app and let you focus on the content. It offers a complete and reliable cross-platform approach.
See How Qt for Android Works for further details on Qt for Android's architecture.
Qt Quick for Android offers you Android APIs that enable you to insert QML content as an Android View in your project.
These are the public Java and Kotlin APIs that you will use in an Android app to embed QML.
To use these classes, you must include the following in your build.gradle file:
packagingOptions.jniLibs.useLegacyPackaging true
Note: See the QT_ANDROID_GENERATE_JAVA_QTQUICKVIEW_CONTENTS CMake variable for further information on Java code generation of QML components.
The Qt Gradle Plugin and Qt Tools for Android Studio plugin are provided by Qt for easy development. You can use the Gradle Plugin independently from an IDE as part of your build toolchain. Qt Tools for Android Studio uses the plugin to build your projects in Android Studio.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: