Stay organized with collections
Save and categorize content based on your preferences.
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DevicePickerLauncher\n====================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/com/google/ambient/crossdevice/discovery/DevicePickerLauncher \"View this page in Kotlin\") \\|Java\n\n\n```\n@RequiresApi(value = 26) interface DevicePickerLauncher\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA launcher to start a device discovery and show a dialog chooser to display available devices.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `abstract void` | [launchDevicePicker](/reference/com/google/ambient/crossdevice/discovery/DevicePickerLauncher#launchDevicePicker(kotlin.collections.List,com.google.ambient.crossdevice.wakeup.StartComponentRequest))`(` ` @`[NonNull](/reference/androidx/annotation/NonNull)` `[List](/reference/java/util/List)`\u003c@`[NonNull](/reference/androidx/annotation/NonNull)` `[DeviceFilter](/reference/com/google/ambient/crossdevice/discovery/DeviceFilter)`\u003e deviceFilters,` ` @`[NonNull](/reference/androidx/annotation/NonNull)` `[StartComponentRequest](/reference/com/google/ambient/crossdevice/wakeup/StartComponentRequest)` startComponentRequest` `)` Launches a dialog chooser for available devices. |\n| `abstract @`[NonNull](/reference/androidx/annotation/NonNull)` `[ListenableFuture](/reference/com/google/common/util/concurrent/ListenableFuture)`\u003c`[Void](/reference/java/lang/Void)`\u003e` | [launchDevicePickerFuture](/reference/com/google/ambient/crossdevice/discovery/DevicePickerLauncher#launchDevicePickerFuture(kotlin.collections.List,com.google.ambient.crossdevice.wakeup.StartComponentRequest))`(` ` @`[NonNull](/reference/androidx/annotation/NonNull)` `[List](/reference/java/util/List)`\u003c@`[NonNull](/reference/androidx/annotation/NonNull)` `[DeviceFilter](/reference/com/google/ambient/crossdevice/discovery/DeviceFilter)`\u003e deviceFilters,` ` @`[NonNull](/reference/androidx/annotation/NonNull)` `[StartComponentRequest](/reference/com/google/ambient/crossdevice/wakeup/StartComponentRequest)` startComponentRequest` `)` Java-compatible version of [launchDevicePicker](/reference/com/google/ambient/crossdevice/discovery/DevicePickerLauncher#launchDevicePicker(kotlin.collections.List,com.google.ambient.crossdevice.wakeup.StartComponentRequest)). |\n\nPublic methods\n--------------\n\n### launchDevicePicker\n\n```\nabstract void launchDevicePicker(\n @NonNull List\u003c@NonNull DeviceFilter\u003e deviceFilters,\n @NonNull StartComponentRequest startComponentRequest\n)\n```\n\nLaunches a dialog chooser for available devices. \n\n| Parameters ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `@`[NonNull](/reference/androidx/annotation/NonNull)` `[List](/reference/java/util/List)`\u003c@`[NonNull](/reference/androidx/annotation/NonNull)` `[DeviceFilter](/reference/com/google/ambient/crossdevice/discovery/DeviceFilter)`\u003e deviceFilters` | Only devices that pass all filters will be shown to the user. Note: There are currently no [DeviceFilters](/reference/com/google/ambient/crossdevice/discovery/DeviceFilter) supported in this version, so callers must pass in an empty list. |\n| `@`[NonNull](/reference/androidx/annotation/NonNull)` `[StartComponentRequest](/reference/com/google/ambient/crossdevice/wakeup/StartComponentRequest)` startComponentRequest` | A request indicating how the caller wants the Android component to be started on the receiving device. |\n\n### launchDevicePickerFuture\n\n```\nabstract @NonNull ListenableFuture\u003cVoid\u003e launchDevicePickerFuture(\n @NonNull List\u003c@NonNull DeviceFilter\u003e deviceFilters,\n @NonNull StartComponentRequest startComponentRequest\n)\n```\n\nJava-compatible version of [launchDevicePicker](/reference/com/google/ambient/crossdevice/discovery/DevicePickerLauncher#launchDevicePicker(kotlin.collections.List,com.google.ambient.crossdevice.wakeup.StartComponentRequest))."]]