|
|
|
|
WiFiActivate (Function) In french: WiFiActive Enables or disables Wi-Fi on the device. Remarks: - 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.
IF Val(SysAndroidVersion(sysVersionNumber))<10 THEN IF WiFiStatus() = wifiDisabled THEN WiFiActivate(True) END END Syntax
<Result> = WiFiActivate([<Wi-Fi activation>])
<Result>: Integer constant Activation status of Wi-Fi after the modification: | | wifiActivationInProgress | The Wi-Fi is being enabled on the device. | wifiDeactivationInProgress | The Wi-Fi is being disabled on the device. | wifiDisabled | The Wi-Fi is disabled on the device. | wifiEnabled | The Wi-Fi is enabled on the device. | wifiError | The 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:
|
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: wd280android.jar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|