Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. List<WifiConfiguration> list = wifiManager.getConfiguredNetworks();
  2. for( WifiConfiguration i : list ) {
  3. if(i.SSID != null && i.SSID.equals(""" + networkSSID + """)) {
  4. wifiManager.disconnect();
  5. wifiManager.enableNetwork(i.networkId, true);
  6. wifiManager.reconnect();
  7.  
  8. break;
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement