UwbManager

public interface UwbManager


Interface for getting UWB capabilities and interacting with nearby UWB devices to perform ranging.

Summary

Public methods

abstract @NonNull UwbClientSessionScope

This method is deprecated. Renamed to controleeSessionScope

abstract @NonNull UwbControleeSessionScope
abstract @NonNull UwbControllerSessionScope
default static final @NonNull UwbManager

Creates a new UwbManager that is used for creating UWB client sessions.

Public methods

clientSessionScope

abstract @NonNull UwbClientSessionScope clientSessionScope()
Returns
@NonNull UwbClientSessionScope

a new UwbClientSessionScope that tracks the lifecycle of a UWB connection.

Throws
androidx.core.uwb.exceptions.UwbServiceNotAvailableException

if the UWB is turned off.

androidx.core.uwb.exceptions.UwbHardwareNotAvailableException

if the hardware is not available on the device.

controleeSessionScope

abstract @NonNull UwbControleeSessionScope controleeSessionScope()
Returns
@NonNull UwbControleeSessionScope

a new UwbControleeSessionScope that tracks the lifecycle of a UWB connection.

Throws
androidx.core.uwb.exceptions.UwbServiceNotAvailableException

if the UWB is turned off.

androidx.core.uwb.exceptions.UwbHardwareNotAvailableException

if the hardware is not available on the device.

controllerSessionScope

abstract @NonNull UwbControllerSessionScope controllerSessionScope()
Returns
@NonNull UwbControllerSessionScope

a new UwbControllerSessionScope that tracks the lifecycle of a UWB connection.

Throws
androidx.core.uwb.exceptions.UwbServiceNotAvailableException

if the UWB is turned off.

androidx.core.uwb.exceptions.UwbHardwareNotAvailableException

if the hardware is not available on the device.

createInstance

Added in 1.0.0-alpha08
default static final @NonNull UwbManager createInstance(@NonNull Context context)

Creates a new UwbManager that is used for creating UWB client sessions.

Extension functions

UwbManagerRx.clientSessionScopeSingle

default final @NonNull Single<@NonNull UwbClientSessionScopeUwbManagerRx.clientSessionScopeSingle(@NonNull UwbManager receiver)

Returns a Single of UwbClientSessionScope.