Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
- I honestly don't even know but I've chased down a rabbit hole for 1…
Browse files Browse the repository at this point in the history
…0 hours for no reason....
  • Loading branch information
arsenal942 committed Dec 4, 2017
1 parent cce1934 commit 542b60a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordovanetworkmanager",
"version": "1.9.6",
"version": "1.9.7",
"cordova": {
"id": "cordovanetworkmanager",
"platforms": [
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordovanetworkmanager"
version="1.9.6">
version="1.9.7">

<name>cordovaNetworkManager</name>
<description>Cordova Network Manager for Android and iOS</description>
Expand Down
6 changes: 2 additions & 4 deletions src/android/cordovanetworkmanager/cordovaNetworkManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 542b60a

Please sign in to comment.