DeviceManager#registerDeviceStateCallback(IDeviceStateCallback) to
register device state callbacks so that your application can receive notifications
when a device on the distributed network becomes online or offline and
call DeviceManager#unregisterDeviceStateCallback(IDeviceStateCallback) to unregister these callbacks.DeviceManager#getDeviceList(int) to obtain information about all devices
on the distributed network.DeviceManager#getDeviceInfo(String) to obtain information about a specified device
on the distributed network.DeviceManager#queryRemoteAbilityByIntent(Intent) to obtain AbilityInfo
information about a non-HarmonyOS application on the distributed network.DeviceManager#initDistributedEnvironment(String, IInitCallback) to initialize
the distributed execution framework on a device with a callback specified to notify your application of
the initialization result. After the cross-device task is complete,
call DeviceManager#unInitDistributedEnvironment(String, IInitCallback) to
deactivate the distributed execution framework.| 接口 | 说明 |
|---|---|
| IDeviceStateCallback |
Provides callbacks that can be invoked when the state of a device
on the distributed network changes to online or offline.
|
| IInitCallback |
Provides callbacks to be invoked upon a successful or failed attempt to initialize the distributed execution
framework.
|
| 类 | 说明 |
|---|---|
| DeviceInfo |
Provides methods for setting and obtaining the network ID, device name, device type, and
device state of a device on the distributed network.
|
| DeviceManager |
Provides methods for managing devices on the distributed network, including registering and
unregistering callbacks for notifications of device online and offline, obtaining information about all
remote devices or a specified remote device, querying information about an remote application based on a specified
Intent, and initializing the distributed execution framework for a device. |
| 枚举 | 说明 |
|---|---|
| DeviceInfo.DeviceState |
Enumerates online and offline states of a device on the distributed network.
|
| DeviceInfo.DeviceType |
Enumerates types of a device on the distributed network.
|