跳到主内容

SL4A experience

Steps to program from ubuntu

phone

  1. mobile -> SL4A -> view -> interpreters -> menu -> private server
  2. find the server port number (say $PORT) for the notification bar.

Ubuntu side

  1. cd bin/android-sdk-linux/platform-tools
  2. adb forward tcp:9999 tcp:$PORT
  3. export AP_PORT=9999
  4. start ipython/python
import android
droid = android.Android()
droid.makeToast('Yes, I am in.')

misc

$ adb push my_script.py /sdcard/sl4a/scripts/lwl