PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the information about the location provider used by the application for geolocation functions.
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.
Example
Universal Windows 10 AppAndroidAndroid Widget
// Check the type of provider used
IF GPSInfo(gpsType) = gpsSatellite THEN
Info("The phone geolocation uses the GPS system.")
END
IF GPSInfo(gpsSpeed) = False THEN
Error("The speed regarding the move of the phone cannot be defined.")
END
Syntax
<Result> = GPSInfo(<Information>)
<Result>: Variant
Requested information according to <Information>.
<Information>: Integer constant
Requested type of information.
gpsAltitudeAltitude of available device.<Result> will correspond to:
  • True if the location provider can be used to define the device altitude,
  • False otherwise or if no location provider was found.
gpsDirectionDirection of the move performed by the device.<Result> will correspond to:
  • True if the location provider can be used to define the direction of the move performed by the device,
  • False otherwise or if no location provider was found.
gpsEnergyEnergy consumption required by the provider.<Result> will correspond to:
  • gpsEnergyLow: The provider must require a low quantity of energy.
  • gpsEnergyMedium: The provider can require a medium quantity of energy.
  • gpsEnergyHigh: The provider can require a high quantity of energy.
gpsPrecisionPrecision of the position measurement performed by the provider.<Result> will correspond to:
  • gpsPrecisionHigh: the position is calculated with high accuracy.
  • gpsPrecisionLow: the position is calculated with low accuracy.
gpsTypeType of location provider.<Result> will correspond to:
  • gpsSatellite: location provider via the network of GPS satellites.
  • gpsNetwork: location provider via the network of mobile antennas or Wi-Fi.
  • 0 if the type of location provider was not defined.
gpsSpeedSpeed of the move performed by the device.<Result> will correspond to:
  • True if the location provider can be used to define the speed of the move performed by the device,
  • False otherwise or if no location provider was found.
Remarks

Special cases

  • It is recommended to initialize the location provider settings with GPSInitParameter before retrieving information from that provider.
  • The activation status of the location provider is returned by GPSStatus.
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: ACCESS_FINE_LOCATION.
Android 10 specific case: Android 10 has implemented a new permission for the functions that allow locating the device: ACCESS_BACKGROUND_LOCATION.
This permission allows using the function when the application is in the background.
When this permission is added to the application, a window allows the user 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.
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 PROCEDURE 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.
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.
Component: wd260java.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment