Help / WLanguage / WLanguage functions / Communication / WiFi functions
  • Required permissions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
WiFiStatus (Function)
In french: WiFiEtat
Returns the current activation status of Wi-Fi on the device or asks to be notified when the activation status of Wi-Fi changes.
  • AndroidAndroid Widget To enable or disable the Wi-Fi on the device, use WiFiActivate.
  • AndroidAndroid Widget The Wi-Fi access is not available in the Android emulator.
  • AndroidAndroid Widget Caution: This feature is available up to Android 9. From Android 10, this information is no longer available: this function causes a fatal error. It is recommended to test the Android version used via SysAndroidVersion.
IF WiFiStatus() = wifiDisabled THEN

Finding out the current activation status of Wi-Fi on the current computer Hide the details

<Result> = WiFiStatus()
<Result>: Integer
Current activation status of Wi-Fi:
wifiActivationInProgressThe Wi-Fi is being enabled on the device.
WEBDEV - Browser code This constant is not available.
wifiDeactivationInProgressThe Wi-Fi is being disabled on the device.
WEBDEV - Browser code This constant is not available.
wifiDisabledThe Wi-Fi is disabled on the device.
wifiEnabledThe Wi-Fi is enabled on the device.
wifiErrorThe activation status of Wi-Fi cannot be retrieved.
iPhone/iPad This constant does not correspond to a possible option.
AndroidAndroid Widget

Enabling the notification for changes of Wi-Fi activation Hide the details

WiFiStatus(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
WLanguage procedure ("callback" procedure) called when the activation status of Wi-Fi changes on the device.
This procedure has the following format:
PROCEDURE <Procedure name> (<New status>, <Former status>)
  • <New status> is an integer corresponding ot the new activation status of Wi-Fi on the device
  • <Former status> is an integer corresponding to the activation status of Wi-Fi on the device before the change of status.
The parameters of this procedure are optional. There is no need to pass parameters to this procedure. Indeed, these parameters are automatically filled during each call.
If this parameter corresponds to an empty string (""), the notifications will not be sent anymore when the status changes. The function has no effect if no notification request was performed.

Required permissions

Calling this function changes the permissions required by the application.
Required permission: ACCESS_WIFI_STATE
This permission allows the applications to access information regarding the Wi-Fi networks.
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:
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- Vibration
- Notifications
- Drawing functions
- Internet
Component: WDJS.DLL
Minimum version required
  • Version 16
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help