getMqttConnectState
Requires:
DeviceKit≥2.5.1@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
Method signature
getMqttConnectState(params: )Minimum SDK versions
- iOS
ThingSmartDeviceKitBizBundle - ≥ 5.2.0
- Android
com.thingclips.smart:thingsmart-bizbundle-devicekit - ≥ 5.2.0
Description
Get MQTT connection status; the callback returns the current connection state
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
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 | DeviceKit Since | Minimum SDK versions |
|---|---|---|---|---|
connectState | number | MQTT connection status 0 Connection failed 1 Connection successful | v3.3.0 | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None