PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Special cases
  • 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
Adds a new network to the list of Wi-Fi networks configured on the device. Then, WiFiConnect is used to connect the device to the added Wi-Fi network.
Note: 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
Identifier is string
Identifier = WiFiAddNetwork("SSID", "BSSID", wifiSecurityWPA, "pwd", True)
IF Identifier <> " "  THEN
        WiFiConnect(Identifier)
END
Syntax
<Result> = WiFiAddNetwork(<SSID> , <BSSID> , <Security> [, <Key> [, <Permanent>]])
<Result>: Character string
  • Network identifier of the new network.
  • Empty string if the network was not created. ErrorInfo returns more details about the problem.
Note: If the added network corresponds to a network that is already configured on the device, <Result>corresponds to the identifier of the existing network.
<SSID>: Character string (with quotes)
SSID (Service Set Identifier) of Wi-Fi network.
<BSSID>: Character string (with quotes)
BSSID (Basic Service Set Identifier) of the access point associated with the network.
<Security>: Character String constant
Type of security used by the Wi-Fi network:
wifiSecurityNoneNo security is used.
wifiSecurityWEPSecurity based on a WEP key (Wired Equivalent Privacy)
wifiSecurityWPASecurity that is using the WPA mechanism (Wi-Fi Protected Access).
wifiSecurityWPA2Security that is using the WPA2 mechanism (Wi-Fi Protected Access).
wifiSecurityWPA_EAPSecurity that is using the WPA mechanism (Wi-Fi Protected Access) and the EAP mechanism (Extensible Authentication Protocol).
wifiSecurityIEEE8021XSecurity that is using the IEEE 802.1x standard.
<Key>: Optional character string
Key used to connect to the secured network. The key is mandatory if the type of the specified security protocol is WPA or WPA2.
<Permanent>: Optional boolean
Indicates whether the addition of the network is permanent:
  • True: the added network will be permanently stored on the device.
  • False (default value): the added network will not be kept when the device is restarted.
Remarks

Special cases

  • If the added network is permanently stored on the device (<Permanent> set to True), the identifiers assigned to each one of the networks can be modified after the execution of WiFiAddNetwork. Use WiFiListNetwork to find out the new identifiers.
  • To delete a network from the list of networks configured on the device, use WiFiDeleteNetwork.

Required permissions

The call to this function modifies the permissions required by the application.
Required permissions :
  • ACCESS_WIFI_STATE: allows the applications to access the information regarding the Wi-Fi networks.
  • CHANGE_WIFI_STATE: allows the applications to modify the Wi-Fi connectivity status.
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