1# Device Management Changelog 2## The cl.distributedDeviceManager.1 API Change 3 4Added device management APIs in OpenHarmony 4.0.9.2. 5 6**Change Impact** 7 8The original [Device Management APIs](../../../application-dev/reference/apis/js-apis-device-manager.md) can still be used but will no longer be maintained. You are advised to use the new APIs for development. 9 10**Key API/Component Changes** 11 12The following APIs are added. 13 14| Module | Class | API | 15| ------------------------------------ | ------------------- | ------------------------------------------------------------ | 16| @ohos.distributedDeviceManager | function | **function** createDeviceManager(bundleName: string): DeviceManager; | 17| @ohos.distributedDeviceManager | function | **function** releaseDeviceManager(deviceManager: DeviceManager): void; | 18| @ohos.distributedDeviceManager | DeviceManager | **function** getAvailableDeviceListSync(): Array<DeviceBasicInfo>; | 19| @ohos.distributedDeviceManager | DeviceManager | **function** getAvailableDeviceList(callback:AsyncCallback<Array<DeviceBasicInfo>>): void; | 20| @ohos.distributedDeviceManager | DeviceManager | **function** getAvailableDeviceList(): Promise<Array<DeviceBasicInfo>>; | 21| @ohos.distributedDeviceManager | DeviceManager | **function** getLocalDeviceNetworkId(): string; | 22| @ohos.distributedDeviceManager | DeviceManager | **function** getLocalDeviceName(): string; | 23| @ohos.distributedDeviceManager | DeviceManager | **function** getLocalDeviceType(): number; | 24| @ohos.distributedDeviceManager | DeviceManager | **function** getLocalDeviceId(): string; | 25| @ohos.distributedDeviceManager | DeviceManager | **function** getDeviceName(networkId: string): string; | 26| @ohos.distributedDeviceManager | DeviceManager | **function** getDeviceType(networkId: string): number; | 27| @ohos.distributedDeviceManager | DeviceManager | **function** startDiscovering(discoverParam: {[key: string]: Object} , filterOptions?: {[key: string]: Object} ): void; | 28| @ohos.distributedDeviceManager | DeviceManager | **function** stopDiscovering(): void; | 29| @ohos.distributedDeviceManager | DeviceManager | **function** bindTarget(deviceId: string, bindParam: {[key: string]: Object} , callback: AsyncCallback<{deviceId: string}>): void; | 30| @ohos.distributedDeviceManager | DeviceManager | **function** unbindTarget(deviceId: string): void; | 31| @ohos.distributedDeviceManager | DeviceManager | **function** replyUiAction(action: number, actionResult: string): void; | 32| @ohos.distributedDeviceManager | DeviceManager | **function** on(type: 'replyResult', callback: Callback<{ param: string}>): void; | 33| @ohos.distributedDeviceManager | DeviceManager | **function** off(type: 'replyResult', callback?: Callback<{ param: string}>): void; | 34| @ohos.distributedDeviceManager | DeviceManager | **function** on(type: 'deviceStateChange', callback: Callback<{ action: DeviceStateChange, device: DeviceBasicInfo }>): void; | 35| @ohos.distributedDeviceManager | DeviceManager | **function** off(type: 'deviceStateChange', callback?: Callback<{ action: DeviceStateChange, device: DeviceBasicInfo }>): void; | 36| @ohos.distributedDeviceManager | DeviceManager | **function** on(type: 'discoverSuccess', callback: Callback<{ device: DeviceBasicInfo }>): void; | 37| @ohos.distributedDeviceManager | DeviceManager | **function** off(type: 'discoverSuccess', callback?: Callback<{ device: DeviceBasicInfo }>): void; | 38| @ohos.distributedDeviceManager | DeviceManager | **function** on(type: 'deviceNameChange', callback: Callback<{ deviceName: string }>): void; | 39| @ohos.distributedDeviceManager | DeviceManager | **function** off(type: 'deviceNameChange', callback?: Callback<{ deviceName: string }>): void; | 40| @ohos.distributedDeviceManager | DeviceManager | **function** on(type: 'discoverFailure', callback: Callback<{ reason: number }>): void; | 41| @ohos.distributedDeviceManager | DeviceManager | **function** off(type: 'discoverFailure', callback?: Callback<{ reason: number }>): void; | 42| @ohos.distributedDeviceManager | DeviceManager | **function** on(type: 'serviceDie', callback?: Callback<{}>): void; | 43| @ohos.distributedDeviceManager | DeviceManager | **function** off(type: 'serviceDie', callback?: Callback<{}>): void; | 44 45**Adaptation Guide** 46 47See [Device Management](../../../application-dev/reference/apis/js-apis-distributedDeviceManager.md). 48