-
-
Save davinctor/3a8c47fe5f9a1d0bf8b362c0ee130f27 to your computer and use it in GitHub Desktop.
Add your Wi-Fi Network to Android Things
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String networkSSID = "Your Network SSID here"; | |
String networkPasskey = "YourNetworkPasswordHere"; | |
WifiConfiguration wifiConfiguration = new WifiConfiguration(); | |
wifiConfiguration.SSID = "\"" + networkSSID + "\""; | |
wifiConfiguration.preSharedKey = "\"" + networkPasskey + "\""; | |
WifiManager manager = (WifiManager) getSystemService(WIFI_SERVICE); | |
manager.addNetwork(wifiConfiguration); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment