You are viewing the Resources for the older version of JourneyApps (V3). JourneyApps V4 is the new default for all new apps since July 1, 2016.

GPS Capturing Support

GPS locations can be captured in the foreground (i.e. the user can see that the location is being captured) or in the background using the gps component. To use the gps component, you need to define an attribute or variable with type location.

Example — "Foreground" Capturing

The following example shows how GPS location capturing can be performed in the "foreground" i.e. the user sees a map showing how their GPS location is captured.

View XML:

Example — "Background" Capturing

The following example shows how GPS location capturing can be performed in the "background" i.e. the user does not see an indication in the app that the location is being captured.

View XML:

Accessing GPS Information from JavaScript / Format Strings

These properties of a GPS location variable or attribute can be accessed from JavaScript and Format Strings, but cannot be modified:

  • latitude
  • longitude
  • altitude
  • horizontal_accuracy
  • vertical_accuracy
  • timestamp

Example — Accessing GPS Information from JavaScript

Example — Accessing GPS Information from Format Strings