[Android-development] Qt and Android NDK

Frederic Champ champ.frederic at gmail.com
Tue Feb 10 21:15:32 CET 2015


Hi BogDan,

I want to make the Android part of our framework close to the desktop one
to avoid rewriting some codes like librairies loading or thread use (boost
threads). Actually I have a proof of concept that uses more than 90% of the
C++ existing code to display a VTK renderer and video in background. The 10
last percents are the use of the NDK like the android_main for the app
entry point and the copy of the assets.

Now, I want to do the same with Qt. I want to set up an Qt app context
without using any java or JNI part.
The NDK provides an app context with a native window (ANativeWindow) on
which your app can draw but I don't know how to set this context to Qt.

Then, I tried to set up my Qt app like on an embedded linux but it failed
for the reasons that I have mentioned.

Am I on a totally wrong way ?

p.s: sorry for my bad english

best,
Fred


Le Tue Feb 10 2015 at 12:14:58, BogDan <bog_dan_ro at yahoo.com> a écrit :

> Hi,
>
> Why don't you use Qt on Android in a Qt way?
>
> Cheers,
> BogDan.
>
>
>   On Tuesday, February 10, 2015 9:54 AM, Frederic Champ <
> champ.frederic at gmail.com> wrote:
>
>
> Hi everyone,
> I’m working on a multi-platform open source project called fw4spl (
> https://github.com/fw4spl-org) and we started the android implementation.
> Our goal is to use the NDK with the less Java code as possible. The entry
> point of our application is the android_main that initializes an
> android_native_app. We have some working PoCs with VTK (not VES) and now
> we want to use Qt to make the app gui.
> If I’m not wrong, it’s the android platform plugin that initializes its
> own app context by getting the Java env with some JNI calls and Qt java
> files like QtApplication.java.
> Then I tried to use eglfs and minimalegl platform plugins to set up my app
> context but both failed: eglfs can't access to the framebuffer fb0 (not
> root) and minimalegl crash while eglCreateWindowSurface() is called...
> Is there an other way to set up a qt app context in a native way, using
> the NDK and an existing android_native_app ?
> --
> *Frédéric CHAMP*
> champ.frederic at gmail.com
>
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20150210/0c2495b6/attachment.html>


More information about the Android-development mailing list