@capgo/capacitor-wifi 8.4.1 → 8.5.0-beta.pr20.12.1
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.
- package/README.md +7 -0
- package/android/src/main/java/ee/forgr/plugin/capacitor_wifi/CapacitorWifiPlugin.java +534 -43
- package/dist/docs.json +19 -3
- package/dist/esm/definitions.d.ts +146 -6
- package/dist/esm/definitions.js +73 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/plugin.cjs.js +73 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +73 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorWifiPlugin/CapacitorWifiPlugin.swift +220 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,6 +124,12 @@ Set autoRouteTraffic to true to bind app traffic to the connected network (usefu
|
|
|
124
124
|
For a persistent connection on Android, use addNetwork() instead.
|
|
125
125
|
On iOS, this creates a persistent connection.
|
|
126
126
|
|
|
127
|
+
Resolves only after the device is confirmed associated with the requested SSID.
|
|
128
|
+
On failure, rejects with a Capacitor error that includes a stable `code`
|
|
129
|
+
from {@link WifiConnectionErrorCode}. Prefer `error.code` over parsing `error.message`.
|
|
130
|
+
Specific codes are returned only when the native OS provides that reason;
|
|
131
|
+
otherwise the plugin returns `CONNECTION_FAILED`.
|
|
132
|
+
|
|
127
133
|
| Param | Type | Description |
|
|
128
134
|
| ------------- | --------------------------------------------------------- | -------------------- |
|
|
129
135
|
| **`options`** | <code><a href="#connectoptions">ConnectOptions</a></code> | - Connection options |
|
|
@@ -426,6 +432,7 @@ Options for connecting to a network
|
|
|
426
432
|
| **`password`** | <code>string</code> | The password for the network (optional for open networks) | | 7.0.0 |
|
|
427
433
|
| **`isHiddenSsid`** | <code>boolean</code> | Whether the network is hidden (Android only) | <code>false</code> | 7.0.0 |
|
|
428
434
|
| **`autoRouteTraffic`** | <code>boolean</code> | Whether to automatically route app traffic through the connected Wi-Fi network (Android only) When enabled, it binds the app process to the connected network using ConnectivityManager.bindProcessToNetwork() This is useful for connecting to local/device-hosted APs (e.g., ESP32, IoT devices) that don't have internet access. | <code>false</code> | 7.0.0 |
|
|
435
|
+
| **`timeoutMs`** | <code>number</code> | Maximum time in milliseconds to wait for confirmation that the device is associated with the requested SSID before rejecting with `CONNECTION_TIMEOUT`. Must be a positive number when provided. | <code>30000</code> | 8.5.0 |
|
|
429
436
|
|
|
430
437
|
|
|
431
438
|
#### DisconnectOptions
|