From mwdat-android
Manages session and stream state for Meta Wearables DAT SDK on Android, including pause/resume, device availability monitoring, and state transitions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mwdat-android:session-lifecycleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage session and stream state in DAT SDK integrations.
Manage session and stream state in DAT SDK integrations.
Create a Session with Wearables.createSession(...), start it, then attach capabilities such as camera streaming. Session lifecycle and stream lifecycle are related but distinct.
| State | Meaning | App action |
|---|---|---|
IDLE | Session created, not started yet | Call session.start() |
STARTING | Connecting to the device | Show loading UI |
STARTED | Session active and ready for capabilities | Add or use capabilities |
PAUSED | Session temporarily suspended | Keep state, wait for resume or stop |
STOPPING | Session is shutting down | Stop user work and wait |
STOPPED | Session ended | Release resources and create a new session if needed |
val session = Wearables.createSession(AutoDeviceSelector()).getOrElse { error ->
throw IllegalStateException(error.description)
}
session.start()
lifecycleScope.launch {
session.state.collect { state ->
when (state) {
DeviceSessionState.STARTED -> onStarted()
DeviceSessionState.PAUSED -> onPaused()
DeviceSessionState.STOPPED -> onStopped()
else -> Unit
}
}
}
Camera streaming has its own state flow after you attach a stream:
STOPPED -> STARTING -> STARTED -> STREAMING -> STOPPING -> STOPPED -> CLOSED
lifecycleScope.launch {
stream.state.collect { state ->
// React to camera capability state changes
}
}
The SDK may pause or stop a session when:
When a session is paused:
lifecycleScope.launch {
Wearables.devices.collect { devices ->
// Update the list of available devices
}
}
Use Wearables.devices and device metadata to decide when it is sensible to create a new session after a stop.
DeviceSessionState values you care aboutSessionError and StreamError failuresnpx claudepluginhub facebook/meta-wearables-dat-android --plugin mwdat-androidManages device session states (idle, started, paused, stopped) for DAT SDK integrations on Meta glasses. Handles pause/resume, stream state transitions, and device availability monitoring.
Diagnoses common setup, session, and stream issues in DAT SDK integrations for Android wearables. Covers Developer Mode, version compatibility, and logging.
Add IMU and GPS sensor data to Meta Display Glasses webapps via Web APIs. For motion tracking, compass, level tool, step counter, shake detection, head tracking, or location.