---
name: "onDeviceOnlineStatusUpdate"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.6" }
platform:
  - "iOS"
  - "Android"
async: true
---

## onDeviceOnlineStatusUpdate

> [VERSION] DeviceKit >= 1.2.6

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Device online/offline status change

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: Online) => void` | Yes | - | Event listener callback function |

### Referenced Types

##### `interface` Online

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `online` | `boolean` | `1.2.6` | Online status |
| `deviceId` | `string` | `1.2.6` | Device ID |
| `onlineType` | `number` | `1.2.6` | Device network online types, represented with bitwise flags; multiple online states can be combined. Defined as follows: bit 0 (1 << 0): Wi-Fi online (Cloud online \|\| Local online); if you only want to check cloud online, use bit 7 bit 1 (1 << 1): Local online bit 2 (1 << 2): BLE online bit 3 (1 << 3): BLEMesh online bit 4 (1 << 4): beacon online bit 5 (1 << 5): Dayu online bit 6 (1 << 6): System BT Online bit 7 (1 << 7): Cloud online bit 8 (1 << 8): Matter online (local) |
