BT

Android Gets Scripting Support with Python, Lua, Beanshell; Ruby planned

by Werner Schuster on Jun 30, 2009 |

The Android Scripting Environment (ASE) add scripting capabilities to Android devices. By installing the ASE, it's possible to write scripts on the device and execute them.

While there are many tools to help with developing Android apps, writing scripts straight on the device allows quick experimentation and prototyping directly on the device, without having to load up the IDE, compile, deploy etc.

The ASE uses two approaches to access Android APIs. Currently, Python and Lua runtimes can be used to run scripts using ASE. These runtimes are native applications, and they access the APIs via JSON RPC.

As Android's based on Java, there's also the option of running JVM languages. Currently, BeanShell, a dynamic version of the Java language, is available. The JVM-based interpreters are simply launched inside ASE, and don't need the indirection of the RPC calls.
The ASE adds a new incentive to get more JVM Languages to work on Android. While JRuby has initial support for running on Android, there remain problems. One issue is Android's use of the Dalvik VM (Android apps are compiled into Dalvik VM bytecodes).

A look at the SVN repository of ASE shows the first signs of JSON RPC based Ruby support.

Another way to use Ruby on Android devices is Rhodes.

It'll be interesting to see how ASE continues to develop. Unlike the iPhone, which doesn't permit applications that bring interpreters to the platform, with ASE, Android devices can now be extended with scripts, which can be created and edited by the user.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT