hello,

The information on ADB / SL4A is quiet overwhelming.
Despite that, especially for people, not familiar with Linux, it's not an easy task to get their first program running. This library allows you to easy upload and run Python files on a Android device, without pressing any button on the Android device.

After installing SL4A and Py4A on the Android device, and ADB on the hostmachine, it's just a matter of connecting the USB cable between Android device and host-PC, and run the program.

One of the simplest program that will run out of the box (without touching any button on the Android device) :

# *****************************************************
from adb_sl4a_support import ADB_Connection

ADB = ADB_Connection ()
print ADB

# Create a simple program
Simple_Program = """
import android
droid = android.Android (( '%s', %s ))
droid.makeToast ( "Wasn't that easy?")
""" % ( ADB.SL4A_Servers [-1][0], ADB.SL4A_Servers [-1][1] )

# execute the program (this will run the program from the host PC !!)
exec ( Simple_Program )
# *****************************************************

you can find the library here:
http://code.google.com/p/pylab-works/downloads/detail?name=adb_sl4a_support.py&can=2&q=

cheers,
Stef
--
http://mail.python.org/mailman/listinfo/python-announce-list

       Support the Python Software Foundation:
       http://www.python.org/psf/donations/

Reply via email to