Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<WifiConfiguration> list = wifiManager.getConfiguredNetworks();
- for( WifiConfiguration i : list ) {
- if(i.SSID != null && i.SSID.equals(""" + networkSSID + """)) {
- wifiManager.disconnect();
- wifiManager.enableNetwork(i.networkId, true);
- wifiManager.reconnect();
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement