[Android-development] Hybrid applications with partly native UI?
Artem Marchenko
artem.marchenko at gmail.com
Mon Feb 16 16:14:46 CET 2015
There are some trials mostly by @achipa to wrap native Android controls in
QML. E.g.
http://achipa.blogspot.fi/2014/11/qml-wrappers-for-native-android.html
Essentially you get a 100% native UI + property binding + other Qt goodies
at a cost of QML animation and Qt graphics. Not unlike a BB10 approach.
Cheers,
Artem.
On Sun, Feb 15, 2015 at 1:43 PM, Pekka Nikander <pekka.nikander at iki.fi>
wrote:
> I'm not BogDan, but I did spend some time in trying to understand the Qt
> Android integration.
>
> > I have poor knowledge of the underlying integration between the Android
> and Qt UI.
>
> Unless I'm completely mistaken, the integration tries to use as much as
> possible the public Android APIs and confine with Android UI conventions.
> This is clearly a deliberate design choice -- there are alternative
> choices, such as interfacing directly with the Android WindowManagerService
> either through the WindowManager API or even directly from C++ over the
> Binder interface.
>
> That said, a Qt Window is mapped onto an Android SurfaceView, which is an
> Android interface to the underlying OpenGL ES window. IIRC, the Java side
> of Qt runtime creates an SurfaceView, then acquires a reference to the
> underlying OpenGL ES window, passes it to the C++ side of the Qt runtime,
> and draws directly to it using C++. However, I never dug very deeply into
> that side, mostly focusing on the WindowManager interactions.
>
> > Hence the question, is it possible to have Qt rendering be confined to a
> native android View?
>
> Well, with a relatively small extension you can most probably create an
> Android SurfaceView pass it to the underlying Qt. AFAICS, the biggest
> problem would be event handling. While the Android Java-level events are
> passed IIRC from the QtActivityDelegate to the Qt C++ side, the
> QtActivityDelegate isn't really designed to be extensible. I presume you
> could interface to it directly from your own Activity subclass, though.
> How to do that, exactly, I don't know.
>
> > So have a Qt app think that a particular View on screen is the display,
> while rest of the UI would be Java?
>
> No, I don't think you can do that. You still need to have a Java
> SurfaceView for each Qt window. Of course, if you use just one Qt Window
> and many Widgets within the window, you would probably get pretty close.
>
> --Pekka
>
>
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development
>
>
--
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20150216/98c89f45/attachment.html>
More information about the Android-development
mailing list