Wi-Fi 輕鬆連線
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
在搭載 Android 10 (API 級別 29) 以上版本的裝置上,您可以使用「輕鬆連線」將 Wi-Fi 憑證提供給對等裝置,取代 Android 9 中已淘汰的 WPS。應用程式可以使用 ACTION_PROCESS_WIFI_EASY_CONNECT_URI
意圖,將「輕鬆連線」整合到設定和佈建流程中。這項意圖需要 URI。通話應用程式可以透過各種方法擷取 URI,包括掃描貼紙或螢幕上的 QR code,或是掃描藍牙 LE 或 NFC 廣告。
取得 URI 後,您可以使用 ACTION_PROCESS_WIFI_EASY_CONNECT_URI
intent 佈建對等裝置的 Wi-Fi 憑證。使用者可以選取要分享的 Wi-Fi 網路,並安全地轉移憑證。
「輕鬆連線」不需要位置或 Wi-Fi 權限。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間:2025-08-27 (世界標準時間)。"],[],[],null,["On 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())."]]