Altova MobileTogether Designer

Start/Stop Geo Tracking

Home Prev Top Next

The Start/Stop Geo Tracking action (screenshot below) starts and stops tracking the geolocation of the mobile device. After having been started, tracking continues till stopped. Every time when the Read Geo Data action is executed, the geolocation data at that moment in time is read from the mobile device, and is entered into the $MT_GEOLOCATION tree. The data in the $MT_GEOLOCATION tree can then be accessed with an XPath expression.

MTDStartGeoTracking

The tutorial Sharing Geolocations shows how the Start/Stop Geo Tracking action can be used.

 

Start geo tracking

To start geolocation tracking on the mobile device, select the action's Start radio button (see screenshot above).

 

Select the geolocation information source that is best suited to the solution:

 

GPS+Network: If the mobile device can be located with GPS, then GPS is used to provide geolocation data. Otherwise, the network provider's geolocator mechanism is used. Geolocation from the network is often less accurate than GPS, but this option has the advantage that geolocation information is always provided. The network thus acts as a backup information source if GPS is not available (for example, inside buildings).

GPS: GPS is used to provide geolocation data. The advantage of using this option is that geolocation data will be accurate. The disadvantage is that, if GPS is not available at a particular location (for example, inside buildings), then no geolocation data will be available.

 

Note:The $MT_GEOLOCATION tree is automatically added to the page sources of the page when the Start/Stop Geo Tracking action or the Read Geo Data action is added to design.

 

 

Geolocations for simulations

For designer and server simulations, you can simulate a geolocation by specifying a geolocations XML file to use. The XPath expression that selects this file the must resolve to a URL that locates the file. The URL can be absolute, or one that is relative to the design file. If no geolocations XML file is specified with this action, then the default geolocations file defined in the Geolocation Settings dialog is used.

 

Stop geo tracking

To stop geolocation tracking on the mobile device, select the action's Stop radio button (see screenshot above).

 

MobileTogether extension functions

MobileTogether provides a range of XPath extension functions that have been specifically created for use in MobileTogether designs. Some functions can be particularly useful with specific actions. For example, mt-available-languages() returns the languages in which the solution is available and could, for example, be used with the Message Box action. If a function is especially relevant to this action, it is listed below. For a full list of extension functions and their descriptions, see the topic MobileTogether Extension Functions.

 

mt-change-image-colors()

mt-geolocation-started()

 

© 2017-2023 Altova GmbH