[Android-development] Qt and Android NDK

BogDan bog_dan_ro at yahoo.com
Wed Feb 11 09:04:18 CET 2015


Hi Fred,
Qt *needs* a few java files to work! I tried many times to get rid of them, but it was impossible and I end-up adding more :).But these files should not bother you at all, for most of the users these file are "invisible". You don't need to maintain or change them. If IIRC starting with Qt 5.3  they are not copied to your source.So, to use Qt on Android you don't need to take care about Android's Activity, or other Android things, of course unless you really need to access some features/APIs from Android which are not supported by Qt. So, you just need to use Qt on Android in the same way as you are using it on Desktop.
Check http://www.kdab.com/qt-on-android-episode-2/
http://www.kdab.com/qt-android-episode-3/
http://www.kdab.com/qt-android-episode-4/

For more information on how to use Qt on Android.
Cheers,BogDan.
 

     On Tuesday, February 10, 2015 10:15 PM, Frederic Champ <champ.frederic at gmail.com> wrote:
   

 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 CHAMPchamp.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/20150211/d85a1419/attachment.html>


More information about the Android-development mailing list