getConnectedWifi
Requires:
BaseKit≥2.4.3@ray-js/ray≥0.5.9
Platforms:
iOSAndroid
Method signature
getConnectedWifi(params: )Minimum SDK versions
- iOS
ThingSmartBaseKitBizBundle - ≥ 5.2.1
- Android
com.thingclips.smart:thingsmart-bizbundle-basekit - ≥ 5.2.0
Description
Get information about the currently connected Wi‑Fi. Note: On Android, location permission, Wi‑Fi state permission, and network permission are required; not available on iOS
Parameters
| Property | Type | Required | Default | Description | Minimum SDK versions |
|---|---|---|---|---|---|
partialInfo | boolean | No | false | Whether to return partial Wi‑Fi information Android: If thing.getConnectedWifi is called with partialInfo:true, it returns a WifiInfo object containing only the SSID property. iOS: If thing.getConnectedWifi is called with partialInfo:true, it returns a WifiInfo object containing only the SSID and BSSID properties. Default: false | — |
complete | () => void | No | - | Completion callback (executed on both success and failure) | — |
success | (params: Object) => void | No | - | Callback on successful API call | — |
fail | (params: Object) => void | No | - | Failure callback | — |
success callback parameters
| Property | Type | Description | BaseKit Since | Minimum SDK versions |
|---|---|---|---|---|
SSID | string | Wi‑Fi SSID | v3.2.6 | — |
BSSID | string | Wi‑Fi BSSID | v3.2.6 | — |
signalStrength | number | Wi‑Fi signal strength. Android range: 0–100; iOS range: 0–1. Larger values indicate stronger signal. | v3.2.6 | — |
secure | boolean | Whether the Wi‑Fi is secure Android: Supported starting from Android 12. | v3.2.6 | — |
frequency | number | Wi‑Fi band in MHz | v3.2.6 | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None