Official Content

This method is provided by the Maps external object. It triggers the GPS to start tracking the device's location. The updated location will be changed for every ChangesInterval and also if the device moved a certain distance.

Return value None
Parameters TrackingParameters SDT

TrackingParameters SDT members

  • ChangesInterval: Numeric (8.0)

Specifies the minimum time in seconds between change updates. 0 means ignore this parameter.

  • Distance: Numeric (8.0)

Specifies the minimum distance between change updates. 0 means any distance.

  • Action: Character (20)

Specifies the name of the action that the app will automatically call to process the latest updates of the Tracking methods. This action should be defined in the Menu object as an Item or Notification (Notifications area). Note: The called action must be an event that does not contain any UI interaction.

  • ActionTimeInterval: Numeric (8.0)

Specifies the minimum time that must elapse before the action is executed again. The value entered in this parameter must be greater than ChangesInterval; otherwise, this parameter will be ignored. This time interval is restarted when the Action is executed, and it is not affected when the geolocation changes.

  • Accuracy: Numeric (8.0)

Measurement in meters per second of the device movement.

  • UseForegroundService: Boolean

Only for Android Platform. You need to enable this option to use this method on Android Devices with an operating system greater than or equal to Android 8.


As the StartTracking method is also supported by the Geolocation external object, it also accepts scalar parameters as follows:


You can define, for example, in a Panel object an event (associated with a button) as follows:

Event 'StartTracking'
        msg("Tracking Started")


The parameters Action and ActionTimeInterval are available for:

UseForegroundService is available for Android since GeneXus 16 upgrade 5.

Warning: The Use Background Location property is mandatory since Android 10.

See Also

HowTo: Solve Tracking with GeneXus
Location When In Use Usage Description property

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant