WLAN Easy Connect
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在搭载 Android 10(API 级别 29)及更高版本的设备上,您可以利用 Easy Connect 为对等设备配置 WLAN 凭据,以替代已在 Android 9 中弃用的 WPS。应用可以使用 ACTION_PROCESS_WIFI_EASY_CONNECT_URI
intent 将 Easy Connect 集成到其设置和配置流程中。此 intent 需要 URI。调用应用可以通过各种方法来检索 URI,包括扫描贴纸或显示屏中的二维码,或扫描蓝牙 LE 或 NFC 广告。
URI 一经可用,您就可以使用 ACTION_PROCESS_WIFI_EASY_CONNECT_URI
intent 来配置对等设备的 WLAN 凭据。这样一来,用户就可以选择 WLAN 网络以共享并安全地传输相关凭据。
Easy Connect 不需要位置权限或 WLAN 权限。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# Wi-Fi Easy Connect\n\nOn Android 10 (API level 29) and higher devices, you can use Easy Connect to provision\nWi-Fi credentials to a peer device, as a replacement of WPS which was\ndeprecated in Android 9. Apps can integrate\nEasy Connect into their setup and provisioning flow by using the\n[`ACTION_PROCESS_WIFI_EASY_CONNECT_URI`](/reference/android/provider/Settings#ACTION_PROCESS_WIFI_EASY_CONNECT_URI)\nintent. This intent requires a URI. The calling app can retrieve the URI through\nvarious methods, including scanning a QR code from a sticker or display, or\nthrough scanning Bluetooth LE or NFC advertisements.\n\nOnce the URI is available, you can provision the peer device's Wi-Fi credentials\nwith the `ACTION_PROCESS_WIFI_EASY_CONNECT_URI` intent. This allows the\nuser to select a Wi-Fi network to share and securely transfer the credentials.\n\nEasy Connect does not require Location or Wi-Fi permissions.\n| **Note:** Before using this intent, the app *must* verify that Easy Connect is supported on the device by calling [`WifiManager.isEasyConnectSupported()`](/reference/android/net/wifi/WifiManager#isEasyConnectSupported())."]]