DevicePickerLauncher


@RequiresApi(value = 26) interface DevicePickerLauncher


A launcher to start a device discovery and show a dialog chooser to display available devices.

Summary

Public functions

suspend Unit
launchDevicePicker(
    deviceFilters: List<DeviceFilter>,
    startComponentRequest: StartComponentRequest
)

Launches a dialog chooser for available devices.

ListenableFuture<Void?>
launchDevicePickerFuture(
    deviceFilters: List<DeviceFilter>,
    startComponentRequest: StartComponentRequest
)

Java-compatible version of launchDevicePicker.

Public functions

launchDevicePicker

suspend fun launchDevicePicker(
    deviceFilters: List<DeviceFilter>,
    startComponentRequest: StartComponentRequest
): Unit

Launches a dialog chooser for available devices.

Parameters
deviceFilters: List<DeviceFilter>

Only devices that pass all filters will be shown to the user. Note: There are currently no DeviceFilters supported in this version, so callers must pass in an empty list.

startComponentRequest: StartComponentRequest

A request indicating how the caller wants the Android component to be started on the receiving device.

launchDevicePickerFuture

fun launchDevicePickerFuture(
    deviceFilters: List<DeviceFilter>,
    startComponentRequest: StartComponentRequest
): ListenableFuture<Void?>

Java-compatible version of launchDevicePicker.