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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
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.
Remarks:
  • 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.
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 19 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
New in version 19
iPhone/iPad This function is now available for iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
iPhone/iPad This function is now available for iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
Example
IF WiFiStatus() = wifiDisabled THEN
        WiFiActivate(True)
END
Syntax

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:
wifiEnabledThe Wi-Fi is enabled on the device.
wifiActivationInProgressThe Wi-Fi is being enabled on the device.
WEBDEV - Browser code This constant is not available.
wifiDisabledThe Wi-Fi is disabled on the device.
wifiDeactivationInProgressThe Wi-Fi is being disabled on the device.
WEBDEV - Browser code This constant is not available.
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>)
where:
  • <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.
Remarks
Android

Required permissions

The call to this function modifies 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:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
Component: WDJS.DLL
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment