android:scripts
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
android:scripts [2011/03/02 23:32] – created cedric | android:scripts [2011/03/03 08:09] (current) – cedric | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | These scripts require the installation of [[http:// | ||
+ | |||
====== Python ====== | ====== Python ====== | ||
+ | ===== Location ===== | ||
+ | <code python> | ||
+ | import android, time | ||
+ | droid = android.Android() | ||
+ | |||
+ | droid.startLocating() | ||
+ | time.sleep(10) | ||
+ | |||
+ | while True: | ||
+ | l = droid.readLocation().result | ||
+ | |||
+ | # provider = network or GPS | ||
+ | latitude = l[' | ||
+ | longitude = l[' | ||
+ | |||
+ | print latitude, longitude | ||
+ | |||
+ | time.sleep(10) | ||
+ | </ | ||
+ | |||
+ | {{tag> |
android/scripts.1299105163.txt.gz · Last modified: 2011/03/02 23:32 by cedric