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 |
- ChangesInterval: Numeric (8.0)
Specifies the minimum time in seconds between change updates. 0 means ignore this parameter.
Specifies the minimum distance between change updates. 0 means any distance.
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.
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.
You can define, for example, in a Panel object an event (associated with a button) as follows:
Event 'StartTracking'
Composite
Maps.ClearLocationHistory()
Maps.StartTracking(60,100,"",0)
msg("Tracking Started")
EndComposite
EndEvent
The parameters Action and ActionTimeInterval are available for:
UseForegroundService is available for Android since GeneXus 16 upgrade 5.
HowTo: Solve Tracking with GeneXus
Location When In Use Usage Description property