grym-android-lighthouse update: new Lite plugin, FAQ & other stuff · My Notes

Yesterday I finished basic integration of "Lite" plugin and QtAndroidCore library yesterday, so now it should be working out of box. "Lite" is a new single-window plugin written by our team (the windowing part is done by marflon, actually) from scratch. There's a separate version of QtAnimatedTiles which builds for Lite, however, differences with the other version are tiny (just 2 lines in Java code and different app name in manifest) and I will take out the old one soon. Also, "Lite" will be the default plugin. mw_grym will be probably discontinued later, unless it will be revived for OpenGL support (not sure it won't be better to add support into Lite instead).

For these who didn't read my previous post on QtAndroidCore, it's the library which integrates Qt and Android except for windowing system and functions which definitely should go into QtMobility (like positioning, cell network functions, and etc.)

Both mw_grym and lite support all additional functionality implemented in QtAndroidCore and core Java - just check the sources to get the impression of amount of stuff needed to be done in addition to windowing layer to make a real-life application working.

·· [Continuing] ··

Some features of QtAndroidCore-based plugins:

- Dynamic libraries can be put into application's APK (Qt libs or additional libs used by your application), so you can distribute your application to end users now.
- More powerful soft keyboard support with support for voice recognition, predictive and phonetic input.
- Access to Android-specific filesystem paths through exported functions and environment variables set by QtAndroidCore. QDir.homePath() is probably working but I did not test it.
- Support for long click through QContextMenuEvent (must be enabled via exported function for now), a standard gesture on Android (implemented fully on native side though).
- Support for application minimization (exit to main menu without stopping application).
- QApplication and its main window are notified via Qt messages when application is minimized or restored.
- Java VM is unloaded when application exits or crashes, which prevents invisible crash on restart because of static variables usage in Qt, even in simple Qt applications.
- Correct exit from QApplication when system finishes activity.
- Keepalive mode, when application creates a "service" to prevent application from being unloaded by system until it exits by itself or system run too low on resources.
- Access to hardware screen size before app's window is displayed on screen, allows to select load resources for screen resolution and etc.
(In Lite you can use QDesktopWidget as normally though, because it has valid data before application window is created).
- Access to Java VM and environment pointers for Qt GUI thread (moved from QtAndroidBridge).
- Qt debug output is correctly mapped to Android log.
- Font database is compiled into QtAndroidCore which makes windowing plugins smaller, important if there will ever be many of them in one system.
- Support for keyboard and pointing devices (mouse, touch screen) also moved to QtAndroidCore.
- TLW filter, an evil (and hopefully temporary) workaround for apps which use non-TLW widgets w/o parents over QGraphicsView, used in mw_grym.
- QtXml, QtSvg and QtOpenGL and not loaded by default, because OpenGL is useless for now and loading them makes no sense and simply bloats RAM.

Known issues in QtAndroidCore (applicable to both Lite and mw_grym):

1. Full-screen software keyboard doesn't show what you are typing. This should be fixed in this quarter. Needs analyzing of Android sources because documentation doesn't contain enough information. There's a non-fullscreen mode like in BogDan's version which can be selected through an exported function, but, like in mw/sw it doesn't support
voice, predictive and phonetic input.

Known issues in Lite:

1. Doesn't support Z-order of windows, so you have to have only one top-level window at once. Well, nobody else has that for now.

Known issues in mw_grym:

1. Totally cannot work with multiple top-level widgets and if you have non-TLW widgets with NULL parents (e.g. put over QGraphicsView) you have to enable the TLW filter hack.

2. May go blank screen after application is sitting in background few for hours and device being used for other tasks, for unknown reasons.

Now a little FAQ:

NDK and Android version support:

Support for Android 2.1 and 2.2 is guaranteed to continue, and support for 1.7 will be probably added as soon as Qt 4.8 come out and allow to use Lighthouse under commercial license. For now we are using QADK or newer Crystax NDK with additional files from QADK (see
NDK5 config file is available but not tested and not supported for now, but will be later. The primary goal is to deliver applications to biggest share of users possible, and now, not to provide "cooler" applications but for fewer people some undefined time later. So NDK5 has the only potential advantage for us in next couple years: debugging (and then recompiling debugged apps for Android 2.1 via NDK4 anyway).

QtCreator support:

I will merge QtCreator-related stuff from BogDan's branch a bit later, however, it will not work out of box for now because we use another directory for Java to reduce merging problems, and another plugin libraries. That's very easy to fix but we just don't have time yet.


It is completely taken out, however, its public header has been left there and modified to take JNI values from QtAndroidCore.


We don't use it now and don't plan to in foreseeable future, but it should not be problem to use someone else's version.


mw_grym has OpenGL at the point where BogDan left it in mw (i.e. not working). There's a version of mw_grym ( which is built without OpenGL support and therefore doesn't require
Lite has no support for OpenGL for now, at all.
No plans to work on OpenGL at the moment.

BogDan's mw/sw:

These plugins have been left in the repository only as a reference and to ease downstream merging. They are not functional at the moment because QtAndroidMain interface has been changed and because they don't load QtAndroidCore. mw_grym is much bugfixed and improved version of mw, so there's no reason to support the old mw at all. sw has been developed in parallel with Lite and basically does the same but with a bit different approach. If anyone sees any advantages in adding support for QtAndroidCore into sw and supporting it as well - you are welcome to do that. Also sw can be modified to share the same Java layer as mw_grym in the same manner as mw & sw do.

Merging into android-lighthouse:

Didn't happen in past 6 months, so don't wait for that.

Link to the repository:

Also posted to:

UPDATE (2015-04): Since Gitorious is going to be shut down the repository has been migrated to GitLab and can be found here:


No Comments for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will not be displayed on this site. Comments containing URL's of non-personal pages may be removed.
Confirmation Code:
Human Confirmation Code (Captcha)

HTML tags and "<", ">" symbols are not allowed. Links will not be converted to hyperlinks. Any commercials are removed and reported as abuse.



© Sergey A. Galin, 1998-2021