Stay organized with collections
Save and categorize content based on your preferences.
DeviceAvailabilityListener
interface DeviceAvailabilityListener
Summary
Public methods
|
abstract Unit |
Called when the availability of nearby devices has changed.
|
Public methods
onDeviceAvailabilityChanged
abstract fun onDeviceAvailabilityChanged(devicesAvailable: Boolean): Unit
Called when the availability of nearby devices has changed. Currently we only support same GAIA
device scanning. Note that the listener is only notified when the number of available devices
has decreased to 0 or increased from 0 to 1+.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`DeviceAvailabilityListener` is an interface used to monitor the availability of nearby devices, particularly those on the same GAIA account."],["It includes a callback function, `onDeviceAvailabilityChanged`, which is triggered when the number of available devices changes, specifically when it drops to zero or increases from zero to one or more."],["This listener primarily focuses on detecting changes in device availability rather than providing detailed information about each device."]]],["The `DeviceAvailabilityListener` interface has one core function: `onDeviceAvailabilityChanged`. This function is triggered when the availability of nearby devices changes. The `devicesAvailable` parameter, a boolean, indicates whether devices are available (true) or not (false). The listener is notified only when the number of available devices transitions to zero or changes from zero to one or more. It currently focuses on same GAIA device scanning.\n"]]