PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Retrieved properties
  • Notes
  • Operating mode in iPhone/iPad
  • Required permissions
  • Required application feature
  • Browsers allowing the geo-localization
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
Asks to be regularly notified about the current device position.
Versions 16 and later
WEBDEV - Browser code This function is now available in Browser code.
New in version 16
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code This function is now available in Browser code.
Versions 17 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
WINDEVWindows This function is now available for the WINDEV applications.
New in version 22
WINDEVWindows This function is now available for the WINDEV applications.
WINDEVWindows This function is now available for the WINDEV applications.
Example
// Branches a procedure to receive the device position at regular intervals
GPSFollowMovement(MovementProc)
// Procedure
PROCÉDURE MovementProc(pos is geoPosition)

Info(" Latitude: " + pos..Latitude)  
Info(" Longitude: " + pos..Longitude)
Syntax
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Enabling the notification mechanism (in a mobile) Hide the details

GPSFollowMovement(<Procedure Name> [, <TimeOut> [, <Distance>]])
<Procedure Name>: Character string (with or without quotes)
Name of WLanguage procedure called at each notification.
This procedure has the following format:
PROCEDURE <Procedure Name>(<Position>)
<Position> is a geoPosition variable containing information about the device position at the time of notification.
<TimeOut>: Optional integer or optional Duration
Minimum time-out (in hundredths of a second) between two notifications. If this parameter is not specified, the minimum time-out will be set to 60 seconds.
Note: This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
Universal Windows 10 App This parameter is ignored.
<Distance>: Optional real
Minimum distance (in meters) between two notifications.
If this parameter is not specified, the minimum distance will be set to 5 meters.
WEBDEV - Browser code

Enabling the notification mechanism in browser code Hide the details

GPSFollowMovement(<Procedure Name>)
<Procedure Name>: Character string (with or without quotes)
Name of WLanguage procedure called at each notification. This procedure has the following format:
PROCEDURE <Procedure Name>(<Position>, <Error>)
where:
  • <Position> is a geoPosition variable containing information about the device position when the notification is performed. To find out whether the ..Speed, ..Precision, ..Direction or ..Altitude properties of a geoPosition variable have been filled when retrieving the position, use ..SpeedValid, ..PrecisionValid, ..DirectionValid and ..AltitudeValid.
  • <Error> is an Integer constant corresponding to the error code and that can take the following values:
    gpsErrorOKNo error was detected.
    gpsErrorRightsThe browser has no sufficient rights to use the geo-localization.
    gpsErrorPositionUnable to define the position (internal error of provider for example).
    gpsErrorTimeoutThe position was not retrieved within the time-out.

Disabling the notification mechanism

GPSFollowMovement()
Remarks
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Retrieved properties

AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Notes

  • The geo-localization functions can consume a lot of resources on the device (battery, bandwidth, etc.). Therefore, we advise you not de define very small values for the minimum time-out and for the minimum distance between two notifications.
  • Versions 21 and later
    AndroidiPhone/iPad You have the ability to perform a geo-localization tracking in background without consuming resources via geoTrackingEnable, geoTrackingDisable, geoTrackingStatus and geoTrackingProcedure. See Geo-localization tracking for more details.
    New in version 21
    AndroidiPhone/iPad You have the ability to perform a geo-localization tracking in background without consuming resources via geoTrackingEnable, geoTrackingDisable, geoTrackingStatus and geoTrackingProcedure. See Geo-localization tracking for more details.
    AndroidiPhone/iPad You have the ability to perform a geo-localization tracking in background without consuming resources via geoTrackingEnable, geoTrackingDisable, geoTrackingStatus and geoTrackingProcedure. See Geo-localization tracking for more details.
  • Versions 21 and later
    iPhone/iPad When generating the application, you can allow the call to GPSFollowMovement when the application is in background ("Allow GPSFollowMovement to be called when the application is in background" option in the "Configuration" step of wizard). In this case, the geo-localization will continue when the application is in background or when the device is in standby mode. See Generating an iOS application for more details.
    New in version 21
    iPhone/iPad When generating the application, you can allow the call to GPSFollowMovement when the application is in background ("Allow GPSFollowMovement to be called when the application is in background" option in the "Configuration" step of wizard). In this case, the geo-localization will continue when the application is in background or when the device is in standby mode. See Generating an iOS application for more details.
    iPhone/iPad When generating the application, you can allow the call to GPSFollowMovement when the application is in background ("Allow GPSFollowMovement to be called when the application is in background" option in the "Configuration" step of wizard). In this case, the geo-localization will continue when the application is in background or when the device is in standby mode. See Generating an iOS application for more details.
    iPhone/iPad When generating the application, you have the ability to allow the call to GPSFollowMovement when the application is in background ("Allow GPSFollowMovement and BeaconDetectPrecise to be called when the application is in background" in the "Configuration" step of wizard). In this case, the geo-localization will continue when the application is in background or when the device is in standby mode. See Generating an iOS application for more details.
  • To stop receiving notifications, call GPSFollowMovement without parameter or call GPSEnd.
Versions 17 and later
iPhone/iPad

Operating mode in iPhone/iPad

During the first startup of a GPS function, the system asks the user for the authorization to perform a geo-localization. If the user refuses, all the GPS functions used in the rest of the application will fail (fatal error).
To re-allow the use of GPS for this application, the system configuration of the application must be modified.
New in version 17
iPhone/iPad

Operating mode in iPhone/iPad

During the first startup of a GPS function, the system asks the user for the authorization to perform a geo-localization. If the user refuses, all the GPS functions used in the rest of the application will fail (fatal error).
To re-allow the use of GPS for this application, the system configuration of the application must be modified.
iPhone/iPad

Operating mode in iPhone/iPad

During the first startup of a GPS function, the system asks the user for the authorization to perform a geo-localization. If the user refuses, all the GPS functions used in the rest of the application will fail (fatal error).
To re-allow the use of GPS for this application, the system configuration of the application must be modified.
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: ACCESS_FINE_LOCATION.
Versions 21 and later
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Geo-localization
This feature allows the applications to access the geo-localization features found on the device or on the computer.
New in version 21
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Geo-localization
This feature allows the applications to access the geo-localization features found on the device or on the computer.
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Geo-localization
This feature allows the applications to access the geo-localization features found on the device or on the computer.
WEBDEV - Browser code

Browsers allowing the geo-localization

Caution: The geo-localization is available for the most recent browsers only:
  • FireFox from version 3.5,
  • Chrome from version 5.0.342.1,
  • Opera from version 10.6,
  • Safari from version 5.0.
During the call to a geo-localization function, the browser requests the authorization to localize.
Note: From Chrome 50 (including on Android), GPSFollowMovement can only be used on the sites secured via an SSL certificate for example. If the site is not secured, the function returns a result that cannot be used. During the test in local (localhost), the function operates properly.
Related Examples:
Android GPS Android (WINDEV Mobile): Android GPS
[ + ] This example presents the use of the GPS functions of WLanguage in an Android application.
It is used to retrieve at regular interval:
- The latitude
- The longitude
- The altitude
- The speed
- The direction
WM Sports Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances.
The application calculates the distance, the time, the average speed and the number of calories spent according to the sport.
The run is displayed on a map control via markers and an itinerary.

The example also includes a server part used to synchronize the user data.
This webservice is available in the WEBDEV "WW_Sports" example.
Components
WINDEV wd230java.dll
WEBDEV - Browser code WDJS.DLL
Android wd230android.jar
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment