Added in API level 35

VirtualDeviceManager.VirtualDeviceListener


public static interface VirtualDeviceManager.VirtualDeviceListener

android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener


Listener for changes in the available virtual devices.

Summary

Public methods

default void onVirtualDeviceClosed(int deviceId)

Called whenever a virtual device has been removed from the system.

default void onVirtualDeviceCreated(int deviceId)

Called whenever a new virtual device has been added to the system.

Public methods

onVirtualDeviceClosed

Added in API level 35
public void onVirtualDeviceClosed (int deviceId)

Called whenever a virtual device has been removed from the system.

Parameters
deviceId int: The id of the virtual device that was removed.

onVirtualDeviceCreated

Added in API level 35
public void onVirtualDeviceCreated (int deviceId)

Called whenever a new virtual device has been added to the system. Use VirtualDeviceManager.getVirtualDevice(int) to get more information about the device.

Parameters
deviceId int: The id of the virtual device that was added.