diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 99769da..42e8cc7 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/package.json b/package.json index d7e5d41..4ae54fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordovanetworkmanager", - "version": "1.9.6", + "version": "1.9.7", "cordova": { "id": "cordovanetworkmanager", "platforms": [ diff --git a/plugin.xml b/plugin.xml index 574f10f..64306ec 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ + version="1.9.7"> cordovaNetworkManager Cordova Network Manager for Android and iOS diff --git a/src/android/cordovanetworkmanager/cordovaNetworkManager.java b/src/android/cordovanetworkmanager/cordovaNetworkManager.java index 577948f..9a311b7 100644 --- a/src/android/cordovanetworkmanager/cordovaNetworkManager.java +++ b/src/android/cordovanetworkmanager/cordovaNetworkManager.java @@ -278,10 +278,8 @@ private boolean androidConnectNetwork(CallbackContext callbackContext, JSONArray if (networkIdToConnect >= 0) { // We disable the network before connecting, because if this was the last connection before // a disconnect(), this will not reconnect. - wifiManager.disconnect(); - wifiManager.disableNetwork(networkIdToConnect); + wifiManager.disableNetwork(networkIdToConnect); wifiManager.enableNetwork(networkIdToConnect, true); - wifiManager.reconnect(); SupplicantState supState; WifiInfo wifiInfo = wifiManager.getConnectionInfo(); @@ -290,7 +288,7 @@ private boolean androidConnectNetwork(CallbackContext callbackContext, JSONArray return true; }else{ - callbackContext.error("cordovaNetworkManager: Cannot connect to network: " + networkIdToConnect); + callbackContext.error("cordovaNetworkManager: Cannot connect to network"); return false; } }