Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat Wi-Fi


May 18, 2021 WeChat Mini Program Development Document


Table of contents


Wi-Fi

Searching for peripheral Wi-Fi is supported in small programs, while connecting to a specified Wi-Fi, incoming password.

This series of interfaces is the native capabilities of the system, to view the "WeChat Wi-Fi" capabilities and configuration jump programs, please refer to the documentation.

The connection specifies the timing of the Wi-Fi interface call:

  • Android:startWifi —> connectWifi —> onWifiConnected
  • iOS (iOS 11 and above only): startWifi - connectWifi - onWifiConnected

Time series for calls to the peripheral Wi-Fi interface:

  • Android:startWifi —> getWifiList —> onGetWifiList —> connectWifi —> onWifiConnected
  • iOS (iOS 11.0 and 11.1 versions are not supported for system reasons): startWifi - getWifiList - onGetWifiList - setWifiList - onWifiList

Attention:

  • Wi-Fi-related interfaces are temporarily unavailable for wx.canIUse interface judgment.
  • Versions above Android 6.0 can prevent the device from getting peripheral Wi-Fi information properly without turning on the positioning switch.