Connecting Android apps to the Geode
24 Mar 2020
Original article from 2 Dec 2019, updated 24 Mar 2020 -
In the Android operating system, our Geode Connect utility can act as the Mock Location Provider when Developer Options are enabled, allowing any app that uses the Android Location APIs, Google Location APIs, or web (HTML5) Location APIs to access it in place of any integrated location sensor. The Android Location APIs are described starting at the following web page.
Through using this method, your Android app won’t have true accuracy data, or raw NMEA stream, just the location data provided through the Android location manager (basically Lat/Long, Altitude, Velocity, Heading, and HDOP/VDOP/PDOP which only provide a rough accuracy indication). This and other limitations of location services are detailed at this web page.
Location Service vs Direct Connect to Geode
If desired, an Android app can instead work directly with the Geode GNSS receiver to provide further data, such as a more accurate indication of horizontal positioning. Sample code for use in writing an app in Android to work directly with the Geode is provided at the following web page.
If developing an Android app to work with the Geode, it may be helpful to use a foreground service for the app. For more information, see Using a Foreground Service for your App.
Once you have direct access to NMEA data, you can then use RMS data such as from the GST string to achieve a better indication of statistical location accuracy. If you have limited or no access to real-time data from a Geode GNSS receiver, some previously recorded samples are as follows. The first sample shows the default NMEA-0183 version 4.1 data that comes out from the Geode with the default settings applied. The second sample shows only the GST and RRE messages enabled for statistical accuracy information. Both samples end with the custom battery level message.
The Geode contains the Hemisphere P206 receiver. The following Hemisphere GNSS Technical Reference Manual shows the parsing for all of the components of each NMEA message, including GST and RRE such as for possibly deriving a better indication of when achieving sub-meter horizontal positioning accuracies.
Hemisphere GNSS Technical Reference Manual