mafulechka
mafulechkaMay 28, 2020, 2:43 p.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
Lz

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

  • Result:70points,
  • Rating points1
РК

Qt - Test 001. Signals and slots

  • Result:84points,
  • Rating points4
Last comments
k
kmssrFeb. 9, 2024, 5: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, 9: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, 7: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, 8: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
BlinCT
BlinCTJune 25, 2024, 11 a.m.
Нарисовать кривую в qml Всем привет. Имеется Лист листов с тосками, точки получаны интерполяцией Лагранжа. Вопрос, как этими точками нарисовать кривую? ChartView отпадает сразу, в qt6.7 появился новый элемент…
Evgenii Legotckoi
Evgenii LegotckoiJune 25, 2024, 1:11 a.m.
добавить qlineseries в функции Я тут. Работы оень много. Отправил его в бан.
BlinCT
BlinCTMay 5, 2024, 3:46 p.m.
Написать свой GraphsView Всем привет. В Qt есть давольно старый обьект дял работы с графиками ChartsView и есть в 6.7 новый но очень сырой и со слабым функционалом GraphsView. По этой причине я хочу написать х…
Evgenii Legotckoi
Evgenii LegotckoiMay 3, 2024, 12:07 a.m.
Мобильное приложение на C++Qt и бэкенд к нему на Django Rest Framework Добрый день. По моему мнению - да, но то, что будет касаться вызовов к функционалу Андроида, может создать огромные трудности.
IscanderChe
IscanderCheApril 30, 2024, 2:22 p.m.
Во Flask рендер шаблона не передаётся в браузер Доброе утро! Имеется вот такой шаблон: <!doctype html><html> <head> <title>{{ title }}</title> <link rel="stylesheet" href="{{ url_…

Follow us in social networks