Saturday, August 14, 2010

Building Android apps using your favorite scripting language

Android market is growing day-by-day with lots of cool new applications. Google is trying to make the application development as easy as possible by launching a WYSIWYG designer for Android apps – Android App Inventor recently. However, the developers were restricted to only one language Java. There is an interesting project hosted on Google code named as Scripting Layer for Android (SL4A) which will remove this language restriction. The project (which was formerly known as Android Scripting Environment) allows you to build applications using any of your favorite scripting languages like Python, Perl, Javascript, etc.

Script Browser (SL4A) Script editor showing Perl scriptHello, World Android application using Perl 

Some interesting facts about Android Scripting

  • Android Scripting works on the principle of cross-compilation. Interpreters are written for different scripting languages which will interpret the scripts and execute them as native Android application.
  • APIs are available for Python, Perl, Javascript, JRuby, Lua, BeanShell, Tcl and Shell. These APIs are simplified interface to many of the APIs available to full-fledged Android development. API Reference.
  • The scripts can be run as background task or from a terminal.
  • Install the application ‘SL4A’ from here. The application has a script editor and a terminal interface. Check out the advanced topics here.
  • The project is hosted on Google code. Anyone, who wants to support their own scripting language, can write the interpreters for the same.

I wrote a Hello, World application using Perl. What are you waiting for? Get your hands dirty. Start building apps using your favorite scripting language. Enjoy scripting!! :-)

-- Varun

No comments:

Post a Comment

google-site-verification: googlea4d68ed16ed2eea6.html