PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Special cases
  • 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
Retrieves the activation status of the geolocation provider or asks to be notified when the status changes.
Versions 17 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 17
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
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 WINDEV applications.
New in version 22
WINDEVWindows This function is now available for WINDEV applications.
WINDEVWindows This function is now available for WINDEV applications.
Example
// Checks the status of the GPS provider
IF GPSStatus() = gpsDisabled THEN
Info("Geolocation is not enabled.")
END
Universal Windows 10 App
// Branches a notification procedure if the status of the GPS is modified
GPSStatus(ProcGPSStatus)
// Procedure called whenever the status of the GPS is modified
PROCEDURE ProcGPSStatus(GPS_Status is int)
 
IF GPS_Status = gpsUnavailable THEN
Info("Geolocation not available.")
END
Syntax

Retrieving the activation status of the provider Hide the details

<Result> = GPSStatus()
<Result>: Integer constant
Activation status of the location provider. The following values can be returned:
gpsEnabledThe provider is enabled.
gpsDisabledThe provider is disabled.
gpsErrorError while retrieving the activation status of the provider. To get the details of the error, use ErrorInfo.
WINDEVUniversal Windows 10 App This constant is not available.
WINDEVUniversal Windows 10 App

Asking to be notified when the activation status changes Hide the details

GPSStatus(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
WLanguage procedure ("callback" procedure) called for each notification.
This procedure has the following format:
PROCEDURE <Procedure name>(<Status>)
<Status> is an integer constant corresponding to the new status of the provider.
It can take the following values:
gpsEnabledThe provider was enabled by the user.
gpsDisabledThe provider was disabled by the user.
gpsAvailableThe provider is available.
gpsOffServiceThe provider is off service.
gpsUnavailableThe provider is temporarily unavailable.
Remarks

Special cases

  • Universal Windows 10 App To stop receiving the notifications when the status changes, call GPSStatus while passing an empty string ("") as parameter or use GPSEnd.
Versions 21 and later
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.
New in version 21
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.
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.
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.
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
Component: wd270java.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment