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
WiFiDetectAccessPoint (Function)
In French: WiFiDétectePointAccès
Starts detecting the Wi-Fi access points currently accessible from the device.
AndroidAndroid Widget Notes:
  • To add the network associated with an access point to the list of networks configured on the device, use WiFiAddNetwork.
  • 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.
Windows This function is now available for the WINDEV applications in Windows.
New in version 18
Android Widget This function is now available in Android Widget mode.
Windows This function is now available for the WINDEV applications in Windows.
Android Widget This function is now available in Android Widget mode.
Windows This function is now available for the WINDEV applications in Windows.
Example
NextTitle("Detecting the Wi-Fi access points")

ListPoint is string
sSSID is string
sBSSID is string

ListPoint = WiFiDetectAccessPoint()
FOR EACH STRING AccessPoint OF ListPoint SEPARATED BY CR
sSSID = ExtractString(AccessPoint, 2, TAB)
sBSSID = ExtractString(AccessPoint, 3, TAB)
...
END
Syntax
<Result> = WiFiDetectAccessPoint([<Time-out>])
<Result>: Character string
  • List of detected Wi-Fi access points separated by CR characters (Carriage Return),
  • Empty string ("") if no Wi-Fi access point was detected. The ErrorOccurred variable is used to find out whether an error occurred while detecting the access points. ErrorInfo returns more details about the problem.
For each network, a set of information is returned in the following format:
<Identifier> + TAB + <SSID> + TAB + <BSSID> +
TAB + <Security> + TAB + <Signal Power>
where:
  • <Identifier> : Identifier of the network associated with the access point, empty string ("") if the access point corresponds to no network configured on the device.
  • <SSID>: SSID (Service Set Identifier) of the Wi-Fi network associated with the access point.
  • <BSSID>: BSSID (Basic Service Set Identifier) of access point
  • <Security>: 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.
  • <Power of Signal>: Power of signal expressed in dBm (decibel per milliwatt).
<Time-out>: Optional integer or optional Duration
Maximum duration of detection in hundredths of a second.
  • An error occurs if this time-out ends before the end of detection.
  • If this time-out is not specified or if it is set to 0, no limitation will be applied to the duration.
This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
Remarks

Special cases

  • The list of access points returned by WiFiDetectAccessPoint is sorted by order of signal power (from the most powerful signal to the less powerful one).
  • AndroidAndroid Widget If the function is run by the main thread of the application, an hourglass (infinite progress bar) will be displayed during the detection of access points. To specify the message that will be displayed in the hourglass, use NextTitle just before the call to WiFiDetectAccessPoint.
  • From Android 6.0: The location must be enabled on the device. Otherwise, the function will return an empty list. GPSStatus is used to find out whether the location is enabled or not.
AndroidAndroid Widget

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
WINDEV wd230com.dll
Android wd230android.jar
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment