public interface SelectDeviceListListener
Before calling DeviceManager#selectDeviceList(String, Map, SelectDeviceListListener) to register
the device selection callback, you must first create a class to implement this interface and override the
{@link ohos.distributedhardware.devicemanager.SelectDeviceListListener#onGetDeviceList(List SelectDeviceListListener#onGetDeviceList(List} method.
When the user selects a device, {@link ohos.distributedhardware.devicemanager.SelectDeviceListListener#onGetDeviceList(List SelectDeviceListListener#onGetDeviceList(List} will be called to notify your application of the selected device and its status.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onGetDeviceList(List<DeviceInfo> deviceList,
int status) |
Called when a device is selected.
|
void onGetDeviceList(List<DeviceInfo> deviceList, int status)
If your application needs to be notified when a device is selected, you must implement the
SelectDeviceListListener interface, override this callback, and then call
DeviceManager#selectDeviceList(String, Map, SelectDeviceListListener)