UwbAvailabilityObserver
Stay organized with collections
Save and categorize content based on your preferences.
Observer for UWB availability change events.
When UWB state is changed,
onUwbStateChanged(boolean, int)
will be called, sending back the current UWB state
and the state change reason.
Public Methods
public abstract void onUwbStateChanged (boolean
isAvailable, int reason)
Called when UWB state is changed.
Parameters
isAvailable |
whether UWB is available or not |
reason |
the reason why UWB state changed |
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."],[[["`UwbAvailabilityObserver` is an interface used for observing changes in UWB (Ultra-Wideband) availability on an Android device."],["When the UWB state changes, the `onUwbStateChanged()` method is called, providing information about the new state (available or unavailable) and the reason for the change."],["Developers can implement this interface to receive updates about UWB availability and adjust their application's behavior accordingly."]]],["The `UwbAvailabilityObserver` interface monitors changes in UWB (Ultra-Wideband) availability. When the UWB state changes, the `onUwbStateChanged` method is invoked, providing two parameters: `isAvailable`, indicating the current availability of UWB, and `reason`, explaining why the state changed. The `UwbStateChangeReason` nested class defines the specific reasons for the UWB state changes. The `onUwbStateChanged` method returns a `boolean` which represents if UWB is available.\n"]]