# UwbDevice

Artifact: [androidx.core.uwb:uwb](https://developer.android.com/jetpack/androidx/releases/core-uwb) [View Source](https://cs.android.com/search?q=file:androidx/core/uwb/UwbDevice.kt+class:androidx.core.uwb.UwbDevice) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.0.0)

*** ** * ** ***


```
public final class UwbDevice
```

<br />

*** ** * ** ***

Represents a UWB device.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/uwb/UwbDevice#UwbDevice(androidx.core.uwb.UwbAddress)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/uwb/UwbAddress address)` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/uwb/UwbDevice` | `https://developer.android.com/reference/androidx/core/uwb/UwbDevice#createForAddress(kotlin.ByteArray)(@https://developer.android.com/reference/androidx/annotation/NonNull byte[] address)` Creates a new UwbDevice for a given address. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/uwb/UwbDevice` | `https://developer.android.com/reference/androidx/core/uwb/UwbDevice#createForAddress(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html address)` Creates a new UwbDevice for a given address. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/uwb/UwbAddress` | `https://developer.android.com/reference/androidx/core/uwb/UwbDevice#getAddress()()` the device address (e.g., MAC address). |

## Public constructors

### UwbDevice

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.0.0)

```
public UwbDevice(@NonNull UwbAddress address)
```

## Public methods

### createForAddress

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.0.0)

```
public static final @NonNull UwbDevice createForAddress(@NonNull byte[] address)
```

Creates a new UwbDevice for a given address.

### createForAddress

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.0.0)

```
public static final @NonNull UwbDevice createForAddress(@NonNull String address)
```

Creates a new UwbDevice for a given address.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if address is invalid. |

### getAddress

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.0.0)

```
public final @NonNull UwbAddress getAddress()
```

the device address (e.g., MAC address).