PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
WiFiActivate (Function)
In French: WiFiActive
Enables or disables Wi-Fi on the device.
Notes:
  • To find out the activation status of Wi-Fi on the device or to be notified when the status changes, use WiFiStatus.
  • The Wi-Fi access is not available in the Android emulator.
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.
Example
IF WiFiStatus() = wifiDisabled THEN
        WiFiActivate(True)
END
Syntax
<Result> = WiFiActivate([<Wi-Fi Activation>])
<Result>: Integer constant
Activation status of Wi-Fi after the modification:
wifiEnabledThe Wi-Fi is enabled on the device.
wifiActivationInProgressThe Wi-Fi is being enabled on the device.
wifiDisabledThe Wi-Fi is disabled on the device.
wifiDeactivationInProgressThe Wi-Fi is being disabled on the device.
wifiErrorThe activation status of Wi-Fi cannot be retrieved.
<Wi-Fi Activation>: Optional boolean
New activation status of Wi-Fi:
  • True (default value): Enables the Wi-Fi on the device.
  • False: Disables the Wi-Fi on the device.
Remarks

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.
  • CHANGE_WIFI_STATE: this permission allows the applications to modify the Wi-Fi connectivity status.
  • WAKE_LOCK: this permission allows you to use PowerManager WakeLocks to prevent the processor to witch to standby mode or to prevent the screen from being grayed.
Related Examples:
Android System Android (WINDEV Mobile): Android System
[ + ] This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- Notifications
- Drawing functions
- Internet
Components
Android wd230android.jar
Minimum required version
  • Version 16
Comments
Click [Add] to post a comment