Thursday, July 11, 2013

Python for Android



Android Programming Tools

Most Android application programming is done using the Java language. Java code is compiled to bytecode that runs under Android's Java-like Dalvik Virtual Machine. In addition, Android's Native Development Kit provides access to Android's Application Programming Interface, or API, for C or C++ programmers. Programmers experienced with Microsoft's C# programming language can write Android apps using Microsoft .NET clone Mono. Mono for Android supports any .NET CLR, or Common Language Runtime, compatible language, including IronPython. IronPython is an open source, C# version of the Python interpreter.

Scripting Layer for Android (SL4A)

Although Java is the standard language for Android app development, Google engineers have developed a way for fans of interpreted, script languages to create Android apps as well. Currently, Google's Scripting Layer for Android -- SL4A -- supports Python, Perl, JRuby, Lua, BeanShell, JavaScript and Tcl. To develop apps using SL4A, you need to have the Oracle/Sun Java or OpenJDK runtime environment installed. You also need to download the Android SDK. Finally, you must download and install SL4A onto your Android device and the Android device emulator included with the Android SDK.

Python For Android

Python version 2.6.2 has been ported to run on the Android virtual machine in the Scripting Layer for Android environment. Although the latest version of Python is 3.2.2, there is still much Python application development done using older versions of the language. You can download and install the PythonForAndroid application available at 'Code.google.com' on your SL4A-ready Android device and software emulator. Google makes available sample Python scripts, Web application frameworks and a Python module for encryption as well.

Jythonroid

Jythonroid is another version of Python available for Android development. Jythonroid was derived Jython: a implementation of Python written in Java instead of C. Like PythonForAndroid, you can download Jythonroid from Google. Unfortunately, support for Jythonroid has ceased in favor of PythonForAndroid. The last version of Jythonroid still available is version 0.4, released November 2008.

No comments:

Post a Comment