PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Required permissions
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
WiFiConnectionInfo (Function)
In french: WiFiInfoConnexion
Returns the requested information about the current Wi-Fi connection of the device.
Versions 18 and later
Android Widget This function is now available in Android widget mode.
WINDEVWindows This function is now available for WINDEV applications in Windows.
New in version 18
Android Widget This function is now available in Android widget mode.
WINDEVWindows This function is now available for WINDEV applications in Windows.
Android Widget This function is now available in Android widget mode.
WINDEVWindows This function is now available for WINDEV applications in Windows.
Example
Info(StringBuild("Your current connection speed is %1 Mbps", ...
WiFiConnectionInfo(wifiSpeed)))
Syntax
<Result> = WiFiConnectionInfo([<Type of information>])
<Result>: Character string
  • Requested information. If several types of information are requested, each type of information is separated by a CR character (Carriage Return).
    The order in which the information is returned (if requested) is as follows: wifiSSID + wifiBSSID + wifiIPAddress + wifiMacAddress + wifiSpeed + wifiIdNetwork
  • Empty string ("") if the device is not connected to a Wi-Fi access point. The ErrorOccurred variable is set to True. ErrorInfo returns more information on the error.
<Type of information>: Optional Integer constant
Requested information:
wifiIPAddressIP address associated with the connection.
WINDEV Constant not available
wifiMACAddressWi-Fi Mac address of the device.
Caution: From Android SDK version 6, the Mac address returned has the following format "02:00:00:00:00:00".
WINDEV Constant not available
wifiBSSIDBSSID (Basic Service Set Identifier) of the access point of the connection.
wifiIdNetwork
  • Identifier of the network to which the device is connected,
  • Empty string ("") if the device is connected to no identified network.
wifiSSIDSSID (Service Set Identifier) of the Wi-Fi network to which the device is connected.
wifiAll
(Default value)
Full information about the connection (corresponds to wifiSSID + wifiBSSID + wifiIPAddress + wifiMacAddress + wifiSpeed + wifiIdNetwork).
WINDEV The value returned for the wifiIPAddress and wifiMacAddress constants corresponds to an empty string.
wifiSpeedSpeed of the Wi-Fi link (expressed in Mbps).
Remarks
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permissions :
  • ACCESS_WIFI_STATE: This permission allows the applications to access information regarding the Wi-Fi networks.
  • Versions 25 and later
    ACCESS_COARSE_LOCATION: This permission allows an application to access an undefined location (Cell-ID, WiFi).
    New in version 25
    ACCESS_COARSE_LOCATION: This permission allows an application to access an undefined location (Cell-ID, WiFi).
    ACCESS_COARSE_LOCATION: This permission allows an application to access an undefined location (Cell-ID, WiFi).
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 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.
Related Examples:
WM_System Cross-platform examples (WINDEV Mobile): WM_System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
Component: wd270com.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment