ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / WiFi functions
  • 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
Connects the device to the specified Wi-Fi network.
AndroidAndroid Widget Remarks:
  • The Wi-Fi access is not available in the Android emulator.
  • Starting with Android 6, it is no longer possible to connect to a network that has not been added by the application itself.
  • Caution: Starting with Android 10, it is no longer possible to connect to a Wi-Fi network through programming. This function causes a fatal error.
Example
IF WiFiConnect("14758") = True THEN
Info("Wi-Fi connection established.")
END
Syntax
<Result> = WiFiConnect(<Identifier> [, <Password>])
<Result>: Boolean
  • True if the connection was established,
  • False otherwise. ErrorInfo returns more information on the error.
<Identifier>: Character string
Identifier of the network to which we want to connect. This identifier can be:
  • the identifier returned by WiFiAddNetwork (for a network that was just added).
  • AndroidAndroid Widget the identifier of a network selected in the list of available networks (WiFiListNetwork).
    Caution: From Android 6, this type of identifier is no longer available..
<Password>: Optional character string
Password used to connect to a secured network. If this parameter is not specified, the password used will be the one saved in the network configuration (if this password exists).
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.
  • CHANGE_WIFI_STATE: this permission allows the applications to modify the Wi-Fi connectivity status.
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: wd290com.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help