@cappitolian/network-discovery 0.0.2 → 0.0.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.
@@ -13,6 +13,7 @@ import org.json.JSONException;
13
13
 
14
14
  import java.net.InetAddress;
15
15
  import java.util.Map;
16
+ import java.util.Iterator;
16
17
 
17
18
  public class NetworkDiscovery {
18
19
  private static final String TAG = "NetworkDiscovery";
@@ -178,13 +179,9 @@ public class NetworkDiscovery {
178
179
  // Agregar direcciones IP
179
180
  InetAddress host = serviceInfo.getHost();
180
181
  if (host != null) {
181
- try {
182
- JSONArray addresses = new JSONArray();
183
- addresses.put(host.getHostAddress());
184
- serviceData.put("addresses", addresses);
185
- } catch (JSONException e) {
186
- Log.e(TAG, "Error adding addresses", e);
187
- }
182
+ JSONArray addresses = new JSONArray();
183
+ addresses.put(host.getHostAddress());
184
+ serviceData.put("addresses", addresses);
188
185
  }
189
186
 
190
187
  // Agregar TXT records
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cappitolian/network-discovery",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "A Capacitor plugin for network service discovery using mDNS/Bonjour. Allows automatic server-client connection without manual IP configuration.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",