Nov 23

Marius Milner and Ben Collins-Sussman have released Twisty, a z-machine interpreter for Android:

The ‘z-machine’ is a virtual machine designed in 1979 by Infocom for playing text adventures, and has been re-implemented on nearly every computer and PDA since then.

This application allows Android users to play Infocom classics just as ‘Zork’, as well hundreds of newer text adventures written in the last ten years or so. The package comes bundled with a few built-in games, but also allows you to load games from your sdcard.

It is fantastic to see all of the porting work going on to get stuff running on Android, which means on your phone at some point! I have been amazed at how fast people are churning solid code out there.

Nov 23

Poliplus Software took the ME4SE project, which makes Java 2 Micro Edition APIs such as the LCDUI classes and the Generic Connection Framework available for the Java 2 Standard Edition, and created ME4Android:

Since the Android SDK came out last week, I’ve been toying with the idea of porting ME4SE into Android as to make it as easy as possible to port over current JavaME code. With ME4Android, I wanted the porting to be done automatically so no lines of JavaME code would need to be modified but only the build scripts, so targeting Android would only require a rebuild of current JavaME code.

On my first pass at ME4Android, I used our rather large JavaME app called FlyerApp as the test app. This code is done completely on top of
Canvas so it only uses JavaME’s low level user interface libraries. The code uses a few threads, supports animations and does networking.
I figured if ME4Android can run FlyerApp, it will be able to run a lot of Java games too.

In the process of getting FlyerApp to run on Android, I came up with a lot of roadblocks, some architectural and some bugs that
I intend on submitting to Google once there is a formal way of submitting bugs on Android.

To see the exact same (i.e. identical) app run on Blackberry and JavaME phones (Samsung A920/A900, SonyEricsson K790, Motorola V3xx, and others) click here. On this page you can see screen shots and also download the .jar and .cod files.

Nov 22

Ever since I learned about the QR codes initiated in Asia, I have wanted them to take off over here. I was hoping that QR code support would be in Android, and maybe that could bootstrap the system. I am all ready to print a QR code on my business card that points to my website etc. Great stuff.

Then, ZXing was released on Google Code which gives me exactly what I want:

ZXing (pronounced “zebra crossing”) is an open-source, multi-format 1D/2D barcode reader library implemented in Java. Our goal is to support decoding of QR Codes, Data Matrix, and the UPC family of 1D barcodes. It will provide clients for J2ME, J2SE, and Android.

Why? There are several great readers out there, and there are bits of open-source code already for decoding, but not both at the same time. We want everyone to have access to some great source code to play with, so we decided we’d try an experiment, and open up our in-progress effort. Maybe some of it will be useful to you — maybe you can help improve it.

Will this be the best reader ever? Well we hope it gets quite good. Things are far from perfect, and it’s hard to top some of the great (native-code) readers out there. No, we primarily hope to provide a solid base of code from which people can derive other implementations, and to which people can submit new, better code. If this helps raise the quality of readers everywhere we’ve all done our job.

You know it is serious when you see a trial over in the adwords side of the house!

Nov 22

Ray Cromwell and the Timepedia team have released Chronoscope, a charting and visualization platform for Google Web Toolkit, as open source.

When Android came out, they quickly realized that the same charting library that is written in the Java programming language, compiled to JavaScript, could also work on other platforms. So, they tried to get it working on Android:

It required about 8 hours to get this working. Most of the time was spent finding the Android equivalents of Java2D calls, and writing 6 Java classes (the Chronoscope Canvas abstraction layered over Android Graphics API).

Nov 14

You have to love the hacker communities that come up around embedded devices. Although most of the talk around Android development has been Java, the platform is built on Linux, has an ARM chip, and thus you can compile some C!

Tom Cooksey was one of the first to get “Hello World” working in the emulator (and it is a true emulator, so if it works there, it will work on the devices):

1) Create your hello world program:

#include

int main(int argc, char** argv) {
printf(”hello world\n”);
return 0;

}

2) Compile with an arm cross-compiler toolchain. I used a toolchain I
built with gentoo’s crossdev tool, but there are lots out there.
Assuming your c file is hi.c and your cross compiler is called armv6-
vfp-linux-gnueabi-gcc, you can compile using:

armv6-vfp-linux-gnueabi-gcc hi.c -o hi -static

Note the -static. I’ve not figured out the version of libc etc or the
ABI used yet, so for now, link applications statically.

3) Copy to a running emulator:
adb push hi /system/sbin/hi

4) Run it! From the emulator console:
cd /system/sbin
./hi

5) Smile as you see “hello world” printed on the console. :-)

That being said, you are recommended to check out the TOS and think about the ease of using the nice Java APIs ;)

Nov 14

Terrence Barr, technical evangelist for the Java mobile and embedded community at Sun,believes Apple’s plans to release an SDK for iPhone in early-2008 may result in the open-source phoneME version of Java ME winding up on iPhone.

Really? It seems like there are many barriers here:

  • Will the iPhone SDK be rich enough to allow you to embed Java
  • What are the licensing issues around embedding a mobile Java onto the iPhone
  • If this is done by the community, how will it actually bootstrap onto the device itself? Would we see apps that require you to download 20 MB of Java first?
  • I don’t think people want Java ME on the iPhone. They may want to be able to build rich iPhone applications using Java, but they would want full APIs to the iPhone device itself. Could you imagine NOT supporting touch gestures etc?

So, although I think someone in the community may go ahead and do this, I don’t know if it will become a way for people to developer the killer iPhone apps unless Apple gets behind it. What do you think?