PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Special cases
  • Operating mode in iPhone/iPad
  • 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
Initializes the parameters of WLanguage functions for geo-localization and finds a localization provider.
To define the device position, you have the ability to use two types of "localization providers":
  • the network of GPS satellites.
  • the triangulation performed from the network of mobile and Wi-Fi antennas.
Each provider differs by the precision of its information, its energy consumption and the required hardware configuration (presence of a GPS chip, Internet access, etc.).
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad 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
AndroidAndroid Widget
// Find a localization provider that can give information about the speed
// consuming an average amount of energy and providing a high level of precision
GPSInitParameter(gpsAuto, gpsPrecisionHigh + gpsSpeed + gpsEnergyMedium)
Syntax
GPSInitParameter(<Provider to Find> [, <Options>])
<Provider to Find>: Integer constant
Type of requested localization provider.
gpsAutoDefines the most suitable provider according to the criteria specified in the <Options> parameter.
gpsNetworkCalculates the position by using the network of mobile or Wi-Fi antennas.
gpsSatelliteCalculates the position by using the network of GPS satellites.
Versions 17 and later
WINDEViPhone/iPad This parameter is ignored.
New in version 17
WINDEViPhone/iPad This parameter is ignored.
WINDEViPhone/iPad This parameter is ignored.
<Options>: Optional combination of Integer constants
Selection criteria for the localization provider.
AndroidAndroid Widget This parameter is used when <Provider to Find> corresponds to the gpsAuto constant. In the other cases, <Options> is ignored.
The possible values are:
gpsAltitudeIndicates whether the provider must be able to specify the altitude of the device.
WINDEV This constant is not available.
gpsDirectionIndicates whether the provider must be able to specify the move direction of the device.
WINDEV This constant is not available.
gpsEnergyHighIndicates whether the provider can require a high quantity of energy.
WINDEV This constant is not available.
gpsEnergyLowIndicates whether the provider must require a low quantity of energy.
WINDEV This constant is not available.
gpsEnergyMediumIndicates whether the provider can require a medium quantity of energy.
WINDEV This constant is not available.
gpsPrecisionHighThe position is calculated with a high precision.
gpsPrecisionLowThe position is calculated with a low precision.
gpsSpeedIndicates whether the provider must be able to specify the moving speed.
WINDEV This constant is not available.
Notes:
  • The gpsPrecisionxx constants are exclusive between themselves.
  • The gpsEnergyxx constants are exclusive between themselves.
  • No constant is required. If no constant is specified, the function will search for a localization provider that consumes the least amount of energy with any precision and without any specific characteristics.
Remarks

Special cases

  • AndroidAndroid Widget You can find out the availability of a geo-localization provider by using GPSStatus.
  • AndroidAndroid Widget To find out the characteristics of localization provider initialized by GPSInitParameter, use GPSInfo.
  • Depending on the type of device on which the application is started, there may be no provider corresponding to all the specified criteria (no GPS chip, no Internet access, ...).
    If no providers correspond the specified criteria, these criteria are ignored one after the other until a valid provider is obtained according to the following order: energy consumption, precision, direction, speed and altitude.
  • The geo-localization functions can, according to the selected setting and to the call frequency, consume a lot of resources on the device (battery, bandwidth, ...). When the geo-localization functions are no longer used by the application, you must call GPSEnd.
  • If a geo-localization function is called while the parameters have not been defined by GPSInitParameter, the application will attempt to use the localization via GPS first then the one via the network of mobile antennas if the GPS system is not available.
  • The GPS functions cannot be used to perform an indoor geo-localization: the positioning cannot be performed via Wi-Fi hotspots only.
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.
Related Examples:
WM Geo-localization Cross-platform examples (WINDEV Mobile): WM Geo-localization
[ + ] This example explains how to perform proximity searches with geolocalization:
- 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
Components
WINDEV wd230java.dll
Android wd230android.jar
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment