Qt Jenny 1.0 Released

Have you heard about Jenny? No, I do not mean, the girl next door, nor the Spinning Jenny that started the industrial revolution in England in the 17th century. This one is a modern information age revolution, a code generator, a cuter Jenny. Got your eyebrows raised? Are you a Qt developer? Perhaps you are mastering cross-platform development with Qt and deploying apps to Google Play? Read more below! 

Qt Jenny is a Java/Android JNI glue/proxy Qt code generator. You can find and get it from Maven Central. Qt Jenny is a fork of Jenny from LanderlYoung. The fork differs from the original one by supporting JNI call gluing with QJni - classes such as QJniObject. That brings the powers of Qt for Android and the magic of Android Java native APIs to Qt!  

Qt Jenny consists of two Maven artifacts: a compiler and an annotation processor. The former, compiler, is a Java annotation processor that generates Qt C++ APIs for JNI (Java Native Interface) calls based on your Android Java native classes. It automates the creation of the necessary glue code, making it easier to integrate Android Java applications with Qt C++ libraries or applications. The latter, annotation processor, uses Java annotations to mark methods and classes requiring JNI bindings. These annotations provide metadata that the compiler uses to generate the appropriate Qt C++ code.

The revolutionary Qt Jenny allows you to pick any Android Java native manager interface, such as Battery Manager API and configure that into Qt Jenny as one of the interfaces to be generated. Let it generate Qt C++ API’s for you. You can then easily access native Android Java APIs without any stress of gluing the Qt C++ code to Android Java over JNI. Callbacks or Notifications, whichever term you want to use, are supported as well. That's pretty cool, as they are pretty hard to get working with JNI. 

Since Qt 6.10.0 and 6.9.3 you are able to find Jenny example, like any Qt example, via Qt online documentation or as a demo in Qt Creator. This example demonstrates the usage of Android native manager interfaces BatteryManager, PowerManager, VibratorManager and AudioManager. You can also find Qt Jenny documentation online and inside Qt Creator. Documentation explains features and "How-to's" - like installing, configuring and how the generator works under the hood. Enough for the written part, check the video below to see how it looks and how to use it!

Doesn't this sound cool and cute? Try it out!

If you have any feedback, create a fix proposal or feature suggestion at https://bugreports.qt.io/projects/QTTA R'member to use as a Component "QtJenny: General"


Blog Topics:

Comments