These scripts require the installation of SL4A.

Python

Location

import android, time
droid = android.Android()
 
droid.startLocating()
time.sleep(10)
 
while True:
    l = droid.readLocation().result
 
    # provider = network or GPS
    latitude = l['network']['latitude']
    longitude = l['network']['longitude']
 
    print latitude, longitude
 
    time.sleep(10)