Android Scripting With Python
Installation and Hello World
One of the things about the Android platform that appeals to many in the Linux community is the fact that it's based extensively on open source, Oracle lawsuits notwithstanding. The primary way to write applications for an Android-based phone is still Java. Google provides a Software Development Kit (SDK) with all the documentation, libraries and tools you need. There's even an add-on for the open-source Eclipse Integrated Development Environment (IDE) to help you along.
The first thing you need to do is download the appropriate SDK for your phone. We used the HTC Evo 4G running the latest version of Android code named Froyo. You can get started with scripting your phone by downloading the SLA4 application using either the Android Market on your phone or by scanning the QR code on the SLA4 website. Once installed you'll have a new icon labeled SLA4 on your application launch screen.
Touching the SLA4 icon launches the scripting host which initially has only the Shell interpreter installed. You can download other interpreters from the SLA4 homepage. If you happen to have the very cool Firefox add-on to send stuff straight to your phone and the Chrome to Phone app on your phone, you're literally just one click away from sending it to your phone. For our testing purposes, we downloaded the Python interpreter, which puts a 2.6.2 version of the Python language on your phone.
If you really want to get serious about writing and debugging code, you'll need to install the Android SDK. You'll find versions for Linux, Mac OS X and Windows on the Android SDK download page. For Linux, you basically unpack the tgz file and set an environment variable to add the SDK/tools directory to your search path. You'll also need either version 5 or 6 of the Java Development Kit (JDK). They have a page of notes for installing on Ubuntu to help get you up and running. Once that's done, you should be good to go to connect up your phone and start hacking away!
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linux 3.10 Goes Long, Linux 3.11 Advances as LXDE Merges
- 3Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 4Why Linux is Super (Computing)
- 5Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic