---
name: display-access
description: Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback
---
# Display Access (Android)
Use `mwdat-display` to render content on Meta Ray-Ban Display glasses.
Use this skill with `getting-started` and `permissions-registration` when creating a full app. A Display app still needs SDK initialization, app registration, Android permissions, and DAT manifest metadata before it can create a session.
## Add the Display dependency
In `libs.versions.toml`:
```toml
[libraries]
mwdat-display = { group = "com.meta.wearable", name = "mwdat-display", version.ref = "mwdat" }
```
In `app/build.gradle.kts`:
```kotlin
dependencies {
implementation(libs.mwdat.core)
implementation(libs.mwdat.display)
}
```
## Configure the app for Display
Display apps need the same core DAT setup as other apps plus DAM enabled:
```xml
```
Set `mwdat_application_id` and `mwdat_client_token` from Gradle manifest placeholders or `local.properties`, as in the DisplayAccess sample. Developer Mode builds can use the developer registration flow, but production builds need real Wearables Developer Center credentials.
Request the runtime permissions before initializing DAT, then call `Wearables.initialize(context)` once and start observing SDK state. Start registration with `Wearables.startRegistration(activity)`, collect `Wearables.registrationState`, collect `Wearables.registrationErrorStream`, and wait for `RegistrationState.REGISTERED` before creating a display session. Use `Wearables.startUnregistration(activity)` when the user disconnects the app.
## Select a display-capable device
Display content only works on connected, compatible devices whose type supports display. Use the public device filter when you want automatic selection:
```kotlin
import com.meta.wearable.dat.core.Wearables
import com.meta.wearable.dat.core.selectors.AutoDeviceSelector
val selector = AutoDeviceSelector(filter = { device -> device.isDisplayCapable() })
val sessionResult = Wearables.createSession(selector)
```
Use `SpecificDeviceSelector(selectedDeviceId)` instead when your UI lets the user pick a specific `DeviceIdentifier` from `Wearables.devices`.
For device picker UI, mirror the DisplayAccess sample: collect `Wearables.devices`, start a metadata collection for each device ID from `Wearables.devicesMetadata[id]`, remove metadata for devices that disappear, and show device name, `device.deviceType.description`, `device.linkState`, `device.compatibility`, and `device.isDisplayCapable()`. Keep selection disabled unless the device is `LinkState.CONNECTED` and display-capable, and surface `DeviceCompatibility.DEVICE_UPDATE_REQUIRED` with an `openFirmwareUpdate` action.
```kotlin
import com.meta.wearable.dat.core.types.Device
import com.meta.wearable.dat.core.types.DeviceIdentifier
import com.meta.wearable.dat.core.types.LinkState
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.update
private val metadataJobs = mutableMapOf()
private val devicesMetadata = MutableStateFlow