---
name: "onDeviceInfoUpdated"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.6" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## onDeviceInfoUpdated

> [VERSION] DeviceKit >= 1.2.6 | @ray-js/ray >= 0.6.23

> [PLATFORM] iOS, Android

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

### Description

Device information change

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: DeviceControlDevice) => void` | Yes | - |  |

### Referenced Types

##### `interface` DeviceControlDevice

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `4.11.0` | deviceId device ID Supports cross-panel retrieval of other device information; the current panel can pass the current device ID to get it |
| `dps` | `Record<string, Record<string, any>>` | `4.11.0` | dps |


### Examples

#### Basic usage

```tsx
import { device } from '@ray-js/ray'

const { onDeviceInfoUpdated } = device;

onDeviceInfoUpdated((res) => {
  console.log('onDeviceInfoUpdated', res);
});
```
