July 25, 2014

Android Beyond Java, Part One

toolsThis series of posts highlights a number of other languages and toolkits for developing Android applications, beyond the standard Java-based SDK. These are a preview of topics to be covered in CommonsWare’s upcoming book “Android Beyond Java”, to be released in 2010.

Alternative Application Environments

Here, I use the term “application environment” to mean something that can be used to create a full-fledged Android application. Many Java alternatives for Android are only suitable for creating extensions to an existing Android application, or scripts that get run by another program, or something. Those are useful, but if you want to build full Android applications, you need to pick something designed to support that.

With that in mind, here are some alternative application environments for Android, in no particular order:

  • PhoneGap: the granddaddy of them all. You create Android applications using HTML/CSS/Javascript, run in the WebView. PhoneGap injects Javascript objects into the WebView that expose many lower-level Android features, such as the accelerometer. And, done properly, you can create applications that run across multiple mobile operating systems, including iPhone and Blackberry.  PhoneGap is open source.
  • Appcelerator Titanium: follows the same philosophy as PhoneGap, using HTML/CSS/Javascript and WebView to provide a cross-platform environment. Appcelerator Titanium offers a bit more polish than does PhoneGap, but does not appear to support Blackberry at this time. Titanium Mobile is open source.
  • Rhodes: offers a Ruby and HTML approach to building applications. According to Rhomobile, they support iPhone, BlackBerry, Windows Mobile, and Symbian to go along with Android, and that the Ruby is apparently transcoded into something native for the platform. Rhodes is open source (GPLv3 with a commercial license option).
  • xmlvm: offers a Java->Objective-C cross-compiler. Coupled with a Android-esque Java wrapper to the Cocoa libraries, this gives you a means of taking code that runs on Android and moving it to iPhone. xmlvm is open source.
  • Scala: is a JVM language that some have tweaked to build Android applications, by blending the Scala and Android build chains. Scala is gaining popularity for offering functional programming in a JVM environment. Scala is open source.

In addition, it is possible that one will be able to create full applications using Flash in the near future, courtesy of Adobe and Google’s tie up via the Open Screen Project. Some people have already experimented with Flash applications on the HTC Hero. Also, the Cuttlefish Engine, due out late this year, will be a 2D/3D game engine that supports both Android and iPhone.

If you are aware of other frameworks, toolkits, or the like that support creating full Android applications without using Java, post them in the comments!

Next Post: Scripting Languages