Documenting my progress with programming for Android.

2010-04-21

Where Am I

whereami.py
# shows a notification with your location
# johan@vorrrm.nl - (c) 2010

import android

droid = android.Android()
location = droid.getLastKnownLocation().result
address = droid.geocode(location['latitude'], location['longitude'])

street = address.result['result'][0]['thoroughfare']
postalcode = address.result['result'][0]['postal_code']
city = address.result['result'][0]['locality']

droid.makeToast("%s - %s %s" % (street, postalcode, city) )
droid.exit()
Based on the notify_weather.py example script and some trying and guessing based on the Geocode API documentation.

About Me

interactie ontwerper