PyMaemo/Using Location API

Contents

Using Location API

Location framework provides a library called liblocation which is used for developing location aware applications in Fremantle. Liblocation supports internal GPS, network based methods and external bluetooth GPS.

Using liblocation from Python

To start implementing applications using liblocation API on Python, you need to install python-location:

[sbox-FREMANTLE_X86: ~] > apt-get install python-location

Then, on your Python scripts, import the location module:

import location

Liblocation has two public GObjects. GPSDControl is used for starting and stopping of location services, setting location method and interval, and listening for errors. GPSDevice has information about device status and contains the actual fix when one exists. The two GObjects are initiated as follows.

control = location.GPSDControl.get_default()
device = location.GPSDevice()

Location methods

TODO

Location intervals

TODO

GPSDevice and GPSDeviceFix

TODO

Liblocation signals and callbacks

TODO

Starting and stopping locationing

TODO

Complete example