PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
  • Specific features
  • Tracking management: low precision
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Defines the WLanguage procedure that will be called when the location of the user changes.
Caution:
  • Before using this function, geoTrackingEnable must be used to enable location tracking.
  • To be run in the background, this function must be called in the "Initializing" event associated with the project. See "Remarks" for more details.
Example
// -- Project initialization (REQUIRED to run the function in the background)
geoTrackingProcedure(TrackingProcedure)
// Implement the TrackingProcedure procedure
PROCEDURE TrackingProcedure(mLocation is geoPosition)
// Send the location to the server
SendServer(mLocation)
Syntax
<Result> = geoTrackingProcedure(<WLanguage procedure>)
<Result>: Boolean
  • True if the location tracking system is available,
  • False if the location tracking system is not available. To get the details of the error, use ErrorInfo.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure called when the location of the user changes.
This procedure has the following format:
PROCEDURE <Procedure name>(<Location> is geoPosition)
In this code, <Location> is a geoPosition variable corresponding to the current location of the user.
This procedure must be a global procedure of application.
Remarks

Specific features

  • geoTrackingProcedure must be called in the initialization code of project. Indeed, the WLanguage procedure can be called just after the initialization, for a clock in background mode for example.
  • If the application is in stand-by mode, it is automatically restarted when a location is received.
  • iPhone/iPad geoTrackingProcedure can be used in background mode. It is recommended not to access the interface or open windows in the WLanguage procedure, since iOS does not allow accessing the interface when the application is in the background.

Tracking management: low precision

Caution: This location tracking has low precision. The events are sent only if significant changes of location occur and at time intervals exceeding several minutes. For information, the sending conditions per platform are as follows:
  • iPhone/iPad The events regarding the change of location are not sent if the location did not change by more than 500 meters, or if the time interval is less than 5 minutes (December 2014).
  • Android Location change events are sent at intervals that range from 30 seconds to 10 minutes, depending on the distance between locations.
For a more precise tracking, you must use GPSFollowMovement. However, this function:
  • requires the application to be started,
  • Android requires the application to be in the foreground,
  • consumes more battery.
Related Examples:
WM Geolocation Cross-platform examples (WINDEV Mobile): WM Geolocation
[ + ] This example explains how to perform proximity searches with geolocation :
- search around me
- search in a city, at a given address, or close to a specific address.
The results are displayed in a looper and in a map with markers.
Component : wp250device.dll
Minimum version required
  • Version 21
Comments
Click [Add] to post a comment