User Tools

Site Tools


Android Development

CS0 (7/17/2012)

To install SL4A and Python for Android on an Android device (e.g., Kindle Fire)…

  1. Visit and select Featured Downloads to get the latest versions.

To copy a script to the SL4A script directory for easy execution…

  1. Install Android SDK onto your computer, so that adb is in your path and you can connect your Android device. (See
$ adb push /mnt/sdcard/sl4a/scripts/

To edit Python scripts on a workstation and push to a connected Kindle Fire…

  1. Connect Android device to workstation with Android SDK installed.
  2. From SL4A Scripts screen → Menu → View → Interpreters
    1. Set server to use port 4242: Menu → Preferences → Server Port → 4242
    2. Start server on Android device: Menu → Start Server → Private.
  3. Set environment variable with local port (used by typeset -x AP_PORT=4242
  4. Forward local port on workstation to Android device: adb forward tcp:4242 tcp:4242
  5. Download to workstation workspace:
  6. Run Python and play…
$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import android
>>> android = android.Android()
>>> android.makeToast('hello there')

CS1 (8/14/2009)

These notes are based on a Windows 7 environment and Android G1 development unit. Instructions based on Developing in Other IDEs from Android developer site.

Download and install DrJava (current stable release).

Download and install the Android SDK (need additional details of what to do with the zip file).

android_development.txt · Last modified: 2012/07/18 06:56 by jtkorb