wifidirectplugin 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,7 +62,7 @@ public class WifiDirectPlugin extends Plugin {
62
62
  try {
63
63
  context.unregisterReceiver(wifiP2pReceiver);
64
64
  } catch (IllegalArgumentException e) {
65
- Log.w(TAG, "Receiver not registerd or already registered");
65
+ Log.w(TAG, "Receiver not registered or already registered");
66
66
  }
67
67
  }
68
68
  @PluginMethod
@@ -90,6 +90,7 @@ public class WifiDirectPlugin extends Plugin {
90
90
  deviceJson.put("deviceAddress", device.deviceAddress);
91
91
  deviceJson.put("status", device.status);
92
92
  deviceJson.put("connected", device.status == WifiP2pDevice.CONNECTED);
93
+
93
94
  devicesJson.put(deviceJson);
94
95
  } catch (JSONException e) {
95
96
  Log.e(TAG, "JSON error: ", e);
@@ -119,7 +120,7 @@ public class WifiDirectPlugin extends Plugin {
119
120
  }
120
121
  String deviceAddress = call.getString("deviceAddress");
121
122
  Log.d(TAG, "Device Address: " + deviceAddress);
122
- String pin = call.getString("pin");
123
+ String pin = "00000000";
123
124
 
124
125
  if(deviceAddress == null) {
125
126
  Log.e(TAG, "Device address is null");
@@ -144,20 +145,20 @@ public class WifiDirectPlugin extends Plugin {
144
145
  public void onSuccess() {
145
146
  Log.d(TAG, "connect onSuccess Called");
146
147
  call.resolve();
147
- unload();
148
+ // unload();
148
149
  }
149
150
 
150
151
  @Override
151
152
  public void onFailure(int reason) {
152
153
  Log.e(TAG, "connect onFailure Called");
153
154
  call.reject("Connection failed: " + reason);
154
- unload();
155
+ // unload();
155
156
  }
156
157
  });
157
158
  } catch (Exception e) {
158
159
  Log.e(TAG, "connect exception", e);
159
160
  call.reject("Connection exception: " + e.getMessage());
160
- unload();
161
+ // unload();
161
162
  }
162
163
 
163
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wifidirectplugin",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "HT-Installer Wifi Direct Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",