DevicePickerLauncher


@RequiresApi(value = 26) interface DevicePickerLauncher


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

Summary

Public methods

abstract void
launchDevicePicker(
    @NonNull List<@NonNull DeviceFilter> deviceFilters,
    @NonNull StartComponentRequest startComponentRequest
)

Launches a dialog chooser for available devices.

abstract @NonNull ListenableFuture<Void>
launchDevicePickerFuture(
    @NonNull List<@NonNull DeviceFilter> deviceFilters,
    @NonNull StartComponentRequest startComponentRequest
)

Java-compatible version of launchDevicePicker.

Public methods

launchDevicePicker

abstract void launchDevicePicker(
    @NonNull List<@NonNull DeviceFilter> deviceFilters,
    @NonNull StartComponentRequest startComponentRequest
)

Launches a dialog chooser for available devices.

Parameters
@NonNull List<@NonNull DeviceFilter> deviceFilters

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.

@NonNull StartComponentRequest startComponentRequest

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

launchDevicePickerFuture

abstract @NonNull ListenableFuture<VoidlaunchDevicePickerFuture(
    @NonNull List<@NonNull DeviceFilter> deviceFilters,
    @NonNull StartComponentRequest startComponentRequest
)

Java-compatible version of launchDevicePicker.