wxAndroid - first steps + trying to raise interest to contribute :)

890 views
Skip to first unread message

Bakcsi Zsolt

unread,
May 25, 2012, 6:38:21 AM5/25/12
to wx-u...@googlegroups.com
Hello,

wxAndroid is something that would be very nice to have.
The good new is, it's already possible to compile a quite large subset
of wxBase for Android.
Here is a patch:
http://review.bakefile.org/r/362/
that you can apply to the wxWidges development trunk:
http://www.wxwidgets.org/develop/svn.htm
and then, you can compile wx to a static library with 'ndk-debug' (as
usual under Android).

Please, come by, take a look, and contribute :)

For those feeling motivated, take a look here to get even more motivation:
http://www.cofundos.org/project.php?id=115601

Thanks!

Best Regards,
Zsolt

evstevemd

unread,
May 28, 2012, 1:45:42 PM5/28/12
to wx-users
Hi Bakcsi and wxWidget-ters,

On May 25, 1:38 pm, Bakcsi Zsolt <bak...@gmail.com> wrote:
> Hello,
>
> wxAndroid is something that would be very nice to have.
> The good new is, it's already possible to compile a quite large subset
> of wxBase for Android.
> Here is a patch:http://review.bakefile.org/r/362/
> that you can apply to the wxWidges development trunk:http://www.wxwidgets.org/develop/svn.htm
> and then, you can compile wx to a static library with 'ndk-debug' (as
> usual under Android).
>
> Please, come by, take a look, and contribute :)
Looking at NDK it seems that with JNI there is a possibility to
compile C++ and a lot of data structures and strings in Android.
But I cannot get it when it comes to GUI. Let say you want native
wxFrame, will it be a Java JFrame given that Android GUI is Java based
and have no Xserver?

I mean what are "native" widgets when it comes to Android?

Vadim Zeitlin

unread,
May 28, 2012, 1:52:57 PM5/28/12
to wx-u...@googlegroups.com
On Mon, 28 May 2012 10:45:42 -0700 (PDT) evstevemd wrote:

e> But I cannot get it when it comes to GUI. Let say you want native
e> wxFrame, will it be a Java JFrame given that Android GUI is Java based
e> and have no Xserver?

Android doesn't use AWT so it won't be a JFrame but it will be some Java
class, yes.

e> I mean what are "native" widgets when it comes to Android?

Ideal would be to wrap native widgets using something like cppjvm
(https://github.com/danielearwicker/cppjvm). But we'd settle for using
generic widgets under Android as the first step.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

evstevemd

unread,
May 28, 2012, 5:28:09 PM5/28/12
to wx-users
Hi Vadim,

On May 28, 8:52 pm, Vadim Zeitlin <va...@wxwidgets.org> wrote:
> On Mon, 28 May 2012 10:45:42 -0700 (PDT) evstevemd wrote:
>
> e> But I cannot get it when it comes to GUI. Let say you want native
> e> wxFrame, will it be a Java JFrame given that Android GUI is Java based
> e> and have no Xserver?
>
>  Android doesn't use AWT so it won't be a JFrame but it will be some Java
> class, yes.

You are right!

>
> e> I mean what are "native" widgets when it comes to Android?
>
>  Ideal would be to wrap native widgets using something like cppjvm
> (https://github.com/danielearwicker/cppjvm). But we'd settle for using
> generic widgets under Android as the first step.

can you explain more how you make the generic widget? Draw with
OpenGL?

>
>  Regards,
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
>                http://www.tt-solutions.com/
>
>  application_pgp-signature_part
> < 1KViewDownload

Vadim Zeitlin

unread,
May 28, 2012, 5:32:40 PM5/28/12
to wx-u...@googlegroups.com
On Mon, 28 May 2012 14:28:09 -0700 (PDT) evstevemd wrote:

e> can you explain more how you make the generic widget? Draw with
e> OpenGL?

Basically yes. I don't have the details though, they would emerge from
really working on the project only...

Jim Hart

unread,
May 29, 2012, 1:08:40 AM5/29/12
to wx-u...@googlegroups.com
I think it is not possible to use the native Android widgets. As far as I
understood it, the View elements are not accessible out of a native application
because they are implemented in Java only. Thus a wxWidgets implementation needs
to be a Universal port that draws everything for its own.
--
Kind regards

Jim Hart

http://www.lasermarkingsoftware.com
http://www.openapc.com

Follow us at Twitter: https://twitter.com/#!/openapc

Johan Vromans

unread,
May 29, 2012, 2:16:47 AM5/29/12
to wx-u...@googlegroups.com
Jim Hart <ope...@gmail.com> writes:

> Thus a wxWidgets implementation needs to be a Universal port that
> draws everything for its own.

That would be a pain.

Wouldn't it be possible to have a (Java) GUI process communicating with
a (native) Wx process?

-- Johan

Jim Hart

unread,
May 29, 2012, 2:24:14 AM5/29/12
to wx-u...@googlegroups.com
Don't know how fast that would be but theoretically: yes, that should be
possible. But it sounds like an ugly solution for me to store the GUI
information in C++ WX classes and then let Java retrieve these information. In
my opinion that's ugly because of resource consumption and double data storage.
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users

Vadim Zeitlin

unread,
May 29, 2012, 1:21:31 PM5/29/12
to wx-u...@googlegroups.com
On Tue, 29 May 2012 15:08:40 +1000 (EST) Jim Hart wrote:

JH> I think it is not possible to use the native Android widgets. As far as I
JH> understood it, the View elements are not accessible out of a native application
JH> because they are implemented in Java only. Thus a wxWidgets implementation needs
JH> to be a Universal port that draws everything for its own.

It is possible via JNI, please see the previous discussions on wx-dev.
It's not trivial at all but I don't see any reason it shouldn't be
possible. And if cppjvm could be made to work reasonably well it might not
be even that painful.
Reply all
Reply to author
Forward
0 new messages