mafulechka
mafulechkaMay 28, 2020, 4:43 a.m.

What's new in Qt for Android?

Qt 5.15 LTS and Qt for Android

Since many developers use Qt for Android, Qt wants to improve the developer experience. With the next release of Qt 5.15.0, the Qt developers have updated the Android documentation. The updated documentation contains a lot of new content on how to use Qt for Android to maximize its potential. It explains in more detail how to extend Qt to support more advanced features and better integration with Android APIs.


The main topics that have been improved in the documentation are:

• Extending Qt applications to use custom Java classes or assets and packaging structures.
• Versioning dependencies between Android Native Development Kit (NDK) and Qt.
• How to work with Android services in many different ways.
• How to create and use OpenSSL with Android. Dependencies between the OpenSSL repository support all versions of Qt, with both QMake and CMake.

In the same context, a lot of Qt examples that had some issues like layout, scaling, or resolutions were fixed. Qt 5.15.0 Qt Android Extras ships with a new Qt Java Native Interface Messenger (Qt JNI Messenger) sample code. The example demonstrates one of the most important topics when using Qt for Android, namely JNI communication. It explains the workflow of method invocation and data exchange between Java and Qt. The example serves as a starting point for connecting Qt and Android in both directions.

While properly integrating with Android, the Android Native Files dialog can now be used by default to open files and save operations. The native file dialog also uses Android's 'content' file scheme for file content and does additional exception checks that have caused some random crashes in the past. AndroidManifest.xml no longer sets minSdkVersion and targetSdkVersion. Instead, you can install them using the build.gradle file. Android Studio will issue a warning about setting up SDK versions in the manifest file.

Qt Creator 4.12

The latest release of Qt Creator has brought significant improvements to Android development. Qt Creator can now automatically install the Android SDK, which is the main building block for building and running Qt Android applications. It will prompt you to install the required development packages. What's more, using OpenSSL in your applications is now easier with Qt Creator, which allows you to set a local library path and use it with any project from the kit's settings.

One of the significant features of Qt support for Android was the lack of Qt and NDK version control. In the past, Qt Creator could only have one valid NDK, which can be a concern these days when dealing with multiple versions and projects of Qt. The Android versions of Qt relied on different versions of the NDK and the developer had to select and switch to the correct version manually. That's why the Qt developers introduced a way to manage multiple versions of Qt and link each of them to the corresponding version of the NDK. Qt Creator keeps track of this using a shared configuration file. You can also use your own NDK paths if you wish.

Some other changes that the Qt developers have made include a list of examples for Android kits showing examples that have been tested and work on Android devices. For example, examples that are not shown by default include those that have unsupported features or modules on Android. In addition, improvements to the design and functionality of the user interface included AVD Manager , which gained some flexibility in creating AVDs, as well as selection of Manifest Editor icons.

A look into the future

In order to serve Qt's mobile users well, Qt is going to provide many more updates to Android support. The Qt developers will create more examples, documentation, and functionality, paving the way for simple and advanced Android development.

We recommend hosting TIMEWEB
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.

Do you like it? Share on social networks!

Comments

Only authorized users can post comments.
Please, Log in or Sign up
d
  • dsfs
  • April 26, 2024, 11:56 a.m.

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:80points,
  • Rating points4
d
  • dsfs
  • April 26, 2024, 11:45 a.m.

C++ - Test 002. Constants

  • Result:50points,
  • Rating points-4
d
  • dsfs
  • April 26, 2024, 11:35 a.m.

C++ - Test 001. The first program and data types

  • Result:73points,
  • Rating points1
Last comments
k
kmssrFeb. 9, 2024, 2:43 a.m.
Qt Linux - Lesson 001. Autorun Qt application under Linux как сделать автозапуск для флэтпака, который не даёт создавать файлы в ~/.config - вот это вопрос ))
Qt WinAPI - Lesson 007. Working with ICMP Ping in Qt Без строки #include <QRegularExpressionValidator> в заголовочном файле не работает валидатор.
EVA
EVADec. 25, 2023, 6:30 p.m.
Boost - static linking in CMake project under Windows Ошибка LNK1104 часто возникает, когда компоновщик не может найти или открыть файл библиотеки. В вашем случае, это файл libboost_locale-vc142-mt-gd-x64-1_74.lib из библиотеки Boost для C+…
J
JonnyJoDec. 25, 2023, 4:38 p.m.
Boost - static linking in CMake project under Windows Сделал всё по-как у вас, но выдаёт ошибку [build] LINK : fatal error LNK1104: не удается открыть файл "libboost_locale-vc142-mt-gd-x64-1_74.lib" Хоть убей, не могу понять в чём дел…
G
GvozdikDec. 19, 2023, 5:01 a.m.
Qt/C++ - Lesson 056. Connecting the Boost library in Qt for MinGW and MSVC compilers Для решения твой проблемы добавь в файл .pro строчку "LIBS += -lws2_32" она решит проблему , лично мне помогло.
Now discuss on the forum
G
GarApril 22, 2024, 12:46 p.m.
Clipboard Как скопировать окно целиком в clipb?
DA
Dr Gangil AcademicsApril 20, 2024, 2:45 p.m.
Unlock Your Aesthetic Potential: Explore MSC in Facial Aesthetics and Cosmetology in India Embark on a transformative journey with an msc in facial aesthetics and cosmetology in india . Delve into the intricate world of beauty and rejuvenation, guided by expert faculty and …
a
a_vlasovApril 14, 2024, 1:41 p.m.
Мобильное приложение на C++Qt и бэкенд к нему на Django Rest Framework Евгений, добрый день! Такой вопрос. Верно ли следующее утверждение: Любое Android-приложение, написанное на Java/Kotlin чисто теоретически (пусть и с большими трудностями) можно написать и на C+…
Павел Дорофеев
Павел ДорофеевApril 14, 2024, 9:35 a.m.
QTableWidget с 2 заголовками Вот тут есть кастомный QTableView с многорядностью проект поддерживается, обращайтесь
f
fastrexApril 4, 2024, 11:47 a.m.
Вернуть старое поведение QComboBox, не менять индекс при resetModel Добрый день! У нас много проектов в которых используется QComboBox, в версии 5.5.1, когда модель испускает сигнал resetModel, currentIndex не менялся. В версии 5.15 при resetModel происходит try…

Follow us in social networks