ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / WiFi functions
  • Required permissions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
  • Warning: as of Android 10, it is no longer possible to connect to a Wi-Fi network programmatically. This function causes a fatal error.
Example
IF WiFiConnect("14758") = True THEN
	Info("Connexion Wi-Fi établie.")
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).
    Please note: As of Android 6, this type of identifier is no longer available.
<Password>: Optional string or Secret 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).
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
New in version 2025
AndroidAndroid Widget Secret strings are not available for this parameter in Android/Android widget applications.
Remarks
AndroidAndroid Widget

Required permissions

This function changes the permissions required by the application.
Required permissions:
  • ACCESS_WIFI_STATE: this permission allows applications to access information about Wi-Fi networks.
  • CHANGE_WIFI_STATE: this permission allows applications to change the Wi-Fi connectivity state.
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: wd300com.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help