OpenLAPI is most commonly used to access Bluetooth GPS devices from mobile devices, whilst retaining a high level of source code compatibility with JSR-179. OpenLAPI also has a range of backends for emulating location in development environments, making it a popular tool for J2ME developers.
The emulator mode supports the following back-ends for determining location:-
- Access of hardware GPS device over bluetooth (if available)
- Emulate a moving device from an NMEA log file (recorder application provided).
- Emulate a moving device from a predefined trail in a Google Earth file KML.
- Emulate a moving device by picking random entries from a persistent store
And the software may be shipped as part of a MIDlet (Java application) to provide location awareness through the following back-ends:-
- Access of bluetooth GPS device. Bluetooth GPS devices are very affordable.
- Proprietary APIs. A select number of handsets were released with GPS devices in the period before the adoption of JSR-179, and therefore have their own interface. OpenLAPI can provide a wrapper layer to hide the hardware in these cases.
- Log file lookup, appropriate for physically static devices
It is possible to negotiate commercial arrangements with local network providers to allow location detection via CellID and other network specific techniques (e.g. angle of incidence and triangulation). A mobile phone knows which basestation it is communicating with. By knowing where the basestation is located, location awareness can be accurate to several hundred meters!
Similar projects
The FLOPI (Free LOcation aPI) project is written in J2SE and is aimed at adding location awareness to desktop Java applications through many of the same back-ends as OpenLAPI. However, be warned that the author has admitted serious numerical flaws in the Coordinates.distanceTo() and Coordinates.azimuthTo() methods. OpenLAPI uses the Vincenty (1.2MB) algorithm which is guaranteed to be accurate to the μm scale.
Legal
For various technical and legal reasons, OpenLAPI is not referred to as an implementation of JSR-179. In order to legally refer to a piece of software as a JSR, it must pass the SUN TCK. However, as there is currently no publicly available TCK for JSR-179, it is impossible to test any implementations for 100% compliance. Included in OpenLAPI is a suite of tests for self-compliance and we invite the Open Source community to contribute to the tests.
History
OpenLAPI was developed as a side project by Samuel Halliday of ThinkTank Maths Limited in December 2006 and originally released as open source software under the GPL licence. In April 2008, the license was changed to the LGPL. The license allows both commercial entities and open source developers to make use of location services on mobile devices. However, the licence demands that any changes that are made to the OpenLAPI source code are also released under the LGPL. You do not need to open source your applications themselves to use OpenLAPI.