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 <[email protected]>

> 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
>
>
>

Reply via email to