Firefox OS/Geolocation

From MozillaWiki
< Firefox OS
Revision as of 18:52, 24 April 2015 by Rdandu (talk | contribs) (remove extra "=")
Jump to navigation Jump to search

API

Firefox OS geolocation API is the W3C Standard API at http://dev.w3.org/geo/api/spec-source.html

Implementation

The underlying implementation can be different for different hardware providers. As a developer, you should be transparent to the underlying implementation, and write apps using the APIs which specifies whether you want enableHighAccuracy or not. eg: if you are writing a navigation app, which needs accuracy upto a few meters, then enableHighAccuracy=TRUE. If you are writing a weather app which just needs w coarse location, then your app can consume less power by enableHighAccuracy=FALSE.

Commercial Implementations

Mozilla does not produce Firefox OS images for commercial devices-- we provide source code to chip manufacturers and OEMs. These parties customize various parts and create binary images for devices. The final Firefox OS image is mostly representative of what we have in the public source repositories. This is an important distinction because the configuration of some parts (like linux config, device setup, etc) is not in Mozilla's hands.

So, to recap -- some pieces are NOT under Mozilla's control and one of them is the geolocation configuration. It is completely up to the chip manufacturers and OEM to correctly configure a-gps.

AGPS

The configuration of a-gps is in two parts. The first part is in Gecko. B2G/gaia currently uses supl 1.0 with cell fallback. We have code in our geolocation provider that informs the modem that an agps server is located at a QC supl1 server. We do this by calling an API and pass only a FQDN and a port. The other part that needs to be configured is the “modem”. The modem needs to be configured with TLS enabled and the certificate of the QC supl1 server. Mozilla does NOT have any way to configure the modem and OEMs are encouraged to discuss this with their chip manufacturer. (I am using QC here because as of this writing, that is who we are using. If you are using another chip manufacturer you'll have to work with them on an a-gps service).

So, to recap – Mozilla does not ship binaries. Mozilla does not configure Modems. If you are shipping devices, you must ensure that a-gps is configured properly. Configuration of a-gps is completely outside of the scope of Firefox OS.