Posted by: Yanyan | November 6, 2013

Alternative ways to read sensors

I tried this API to read latitude/longitude pairs, using Python script on my Nexus 4. The example they gave has some bugs in there. Can you spot ’em? 🙂

To run it, you need to install SL4A, and upload your code with “adb push” to /sdcard/sl4a/scripts. You can put some print statement to print out your latitude, longitude, and droid.geocode(la, lo).result will lookup your address given the latitude/longitude pair.

Pretty neat API, and performance is not bad either. Will keep you posted.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Categories

%d bloggers like this: