ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Geolocation functions
  • Special cases
  • Required permissions
  • Required application feature
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Stops the location detection triggered by GPSDetectPosition.
Example
// Enables the notification for position detection
nID is int
nID = GPSDetectPosition(DetectionProc, 1.145258, 30.968745)
 
...
 
// Stops the notification for position detection
GPSStopDetection(nID)
Syntax
GPSStopDetection(<Detection identifier>)
<Detection identifier>: Integer
Identifier corresponding to the detection that must be interrupted. This identifier is returned by GPSDetectPosition.
The function has no effect if this identifier corresponds to no current detection.
Remarks

Special cases

  • To stop receiving notifications, use GPSEnd.
  • To stop detecting the proximity of a specific location, you also have the ability to return False in the associated procedure (procedure defined in GPSDetectPosition).
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: ACCESS_FINE_LOCATION.
Android 11 specific case: This function requires the ACCESS_BACKGROUND_LOCATION permission to access the device's location.
This permission allows using the function when the application is in the background.
If the application needs to use background location:
  • Manually add the "ACCESS_BACKGROUND_LOCATION" permission in the Android application generation wizard.
  • Explicitly request background location permission with PermissionRequest. For example:
    PermissionRequest(permBackgroundLocation, Callback)
    INTERNAL PROCÉDURE Callback(p is Permission)
    IF p.Granted THEN
    // Functions that require background location access can be used
    END
    END
A window allows users to:
  • allow access to the device location while the application is in the background,
  • allow access to the location only while the application is in use,
  • deny access to the location. The user can also change these permissions at any time in the Android settings.

Remarks:
  • Follow Google's guidelines for applications that require background location access. For more details, see https://support.google.com/googleplay/android-developer/answer/9799150. If these conditions are not met (especially user information requirements), applications may not be accepted for publication on Google Play.
  • The background location permission should only be requested if the location permission has been granted. Otherwise, PermissionRequest will fail.
  • If the option chosen by the user for the background location access request is more restrictive than the option chosen for the location access request, the application will be automatically restarted.
  • On devices running Android 10 or earlier, if location permission has been granted to the application, the background location permission will be granted without displaying a window.
Universal Windows 10 App

Required application feature

When this function is used, an application feature is declared in the application generation wizard.
Required feature: Geolocation
This feature allows the applications to access the geolocation features found on the device or on the computer.
Business / UI classification: Business Logic
Component: wd290device.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
GPS Functions
https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/519-busca-endereco-rota-endereco-das-coordendas-523/read.awp?hl=enderecodascoordenadas

https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/2875-informatica-exemplo-google-maps-com-json-retornando-distancia/read.awp?lastview
BOLLER
10 Nov. 2018

Last update: 05/26/2022

Send a report | Local help