You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Greg Brown <gk...@mac.com> on 2009/05/06 16:05:16 UTC
Java ME vs. Android
Hi all,
Based on what I have seen so far, trying to get Pivot to run on Java ME seems like it might be an exercise in frustration. It only supports Java 1.4 (maybe only 1.3), documentation is difficult to find, and device support appears to be non-existent.
However, it may be possible to get it to run on Android. Android supports Java 5, so that simplifies things. It also appears to be very well-documented, and there are existing devices capable of running it. The key challenge would be building an AWT adapter layer such that Pivot components could draw themselves. It looks like someone has already started down this path, but it is unfortunately licensed under GPL:
http://code.google.com/p/awt-android-compat/
I imagine that we could do something similar. If we coupled this with an Android-specific skin (which we would probably do, since mobile device UE is quite different from desktop UE), we could even be very selective about which AWT features (i.e. Graphics2D methods) we decide to port.
So, my questions are:
1) Has anyone looked into Android in any depth to know how feasible this might be?
2) How valuable do you think such a port might be? The ability to write an app that can be deployed both as an RIA and to a mobile device seems pretty compelling to me, but I wanted to see what others thought.
Thanks,
Greg
Re: Java ME vs. Android
Posted by Greg Brown <gk...@mac.com>.
>In summary, I don't think it is worth the effort.
Sounds like it may not. But that means I now have less of an excuse to get an Android-enabled phone. ;-)
Re: Java ME vs. Android
Posted by Christopher Brind <br...@brindy.org.uk>.
Hi Greg,
Strangely enough I started looking at Android over the weekend - and I have
to say I love it.
In fact, I couldn't help think of Pivot as I've been playing with it as some
of the concepts are pretty similar (in particular the XML definition of the
UI, though that goes through a code generation step and is compiled
somewhere in to some kind of resource).
Android runs on the Dvalik VM which from what I can see isn't like normal
JVMs. See: http://en.wikipedia.org/wiki/Dalvik_virtual_machine
You write your code in regular Java but when build your app for deployment
the Android SDK does something to it so that it'll work on Dvalik, bytecode
swapping, optimisation and so on. So I don't think it understands JLS
standard .class files. As such, I am not sure how we'd run a Pivot app
without introducing steps to go through the Android SDK.
I got db4o (see http://db4o.com/ ) working on the emulator just by adding it
to my library path, but I guess I'm still running the Android SDK over my
project to produce a deployable artifact so it is probably optimising any
libraries I am using at that point as well.
I just can't see how a Pivot app would be able to cope with that.
My recommendation to developers would be to modularise their code. Put
logic in to a project/jar that can be shared (unchanged) by Pivot and
compiled in to their Android project via the Android SDK.
In summary, I don't think it is worth the effort.
Cheers,
Chris
2009/5/6 Greg Brown <gk...@mac.com>
> Hi all,
>
> Based on what I have seen so far, trying to get Pivot to run on Java ME
> seems like it might be an exercise in frustration. It only supports Java 1.4
> (maybe only 1.3), documentation is difficult to find, and device support
> appears to be non-existent.
>
> However, it may be possible to get it to run on Android. Android supports
> Java 5, so that simplifies things. It also appears to be very
> well-documented, and there are existing devices capable of running it. The
> key challenge would be building an AWT adapter layer such that Pivot
> components could draw themselves. It looks like someone has already started
> down this path, but it is unfortunately licensed under GPL:
>
> http://code.google.com/p/awt-android-compat/
>
> I imagine that we could do something similar. If we coupled this with an
> Android-specific skin (which we would probably do, since mobile device UE is
> quite different from desktop UE), we could even be very selective about
> which AWT features (i.e. Graphics2D methods) we decide to port.
>
> So, my questions are:
>
> 1) Has anyone looked into Android in any depth to know how feasible this
> might be?
>
> 2) How valuable do you think such a port might be? The ability to write an
> app that can be deployed both as an RIA and to a mobile device seems pretty
> compelling to me, but I wanted to see what others thought.
>
> Thanks,
> Greg
>
>
>
Re: Java ME vs. Android
Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wed, May 6, 2009 at 4:05 PM, Greg Brown <gk...@mac.com> wrote:
> However, it may be possible to get it to run on Android. Android supports Java 5, so that simplifies things. It also appears to be very well-documented, and there are existing devices capable of running it. The key challenge would be building an AWT adapter layer such that Pivot components could draw themselves.
Into Android dev at the moment;
The UI draw side of things is not a matter of mimicking AWT on
Android, but that Pivot has abstracted away its own needs into a small
module, which is pluggable for AWT and possibly Android. That may be a
lot of work since I doubt it is the way the project initially got
going. If that was in place, Android's API is pretty neat and most
things are easily mapped.
That said, if Pivot was OpenGL (ES level), then it could work 'out of
the box', but I guess that is even more work...
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/2qq9er
I work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
Re: Java ME vs. Android
Posted by Noel Grandin <no...@gmail.com>.
I guess I'm in the minority amongst computer programmers,
who seem to love producing over-arching abstractions that span multiple
things,
but I really prefer stuff that operates in a limited domain and does it
well,
to code that spans too much stuff and ends up being mediocre.
That being said, I note that the Qt toolkit will run on some mobile
devices, but only Windows Mobile and Nokia S60.
So it can't be too hard, provided you target the more feature-rich devices.
Honestly, I think that Android native UI layer is pretty compelling - it
wouldn't be worth it to me as a developer to ignore all of the extra
stuff you get from running platform native there - things like device
rotation, integration with the home screen, pen input methods, touch
recognisation, etc, all stuff that is mobile specific, but very
necessary to deploying on a mobile platform.
Regards, Noel.
Greg Brown wrote:
> Hi all,
>
> Based on what I have seen so far, trying to get Pivot to run on Java ME seems like it might be an exercise in frustration. It only supports Java 1.4 (maybe only 1.3), documentation is difficult to find, and device support appears to be non-existent.
>
> However, it may be possible to get it to run on Android. Android supports Java 5, so that simplifies things. It also appears to be very well-documented, and there are existing devices capable of running it. The key challenge would be building an AWT adapter layer such that Pivot components could draw themselves. It looks like someone has already started down this path, but it is unfortunately licensed under GPL:
>
> http://code.google.com/p/awt-android-compat/
>
> I imagine that we could do something similar. If we coupled this with an Android-specific skin (which we would probably do, since mobile device UE is quite different from desktop UE), we could even be very selective about which AWT features (i.e. Graphics2D methods) we decide to port.
>
> So, my questions are:
>
> 1) Has anyone looked into Android in any depth to know how feasible this might be?
>
> 2) How valuable do you think such a port might be? The ability to write an app that can be deployed both as an RIA and to a mobile device seems pretty compelling to me, but I wanted to see what others thought.
>
> Thanks,
> Greg
>
>
>