/mwdat-android:sample-app-guidefrom mwdat-android
Guides building an Android DAT app with registration, session creation, camera streaming, and photo capture. Useful when developing Meta Wearables DAT apps.
Ships in mwdat-android. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Build an Android DAT app with registration, sessions, camera streaming, and photo capture.
Pair this with the CameraAccess sample.
AndroidManifest.xml for registration callbacks plus APPLICATION_ID and CLIENT_TOKEN.Wearables in your Application.app/src/main/java/com/example/myapp/
├── MyApplication.kt
├── MainActivity.kt
├── session/
│ └── SessionViewModel.kt
└── ui/
├── RegistrationScreen.kt
└── CameraScreen.kt
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
lifecycleScope.launch {
Wearables.registrationState.collect { state ->
// Update registration UI
}
}
}
fun register() {
Wearables.startRegistration(this)
}
}
class SessionViewModel : ViewModel() {
private var session: Session? = null
private var camera: Camera? = null
fun startCameraSession() {
val createdSession = Wearables.createSession(AutoDeviceSelector()).getOrElse { error ->
throw IllegalStateException(error.description)
}
createdSession.start()
session = createdSession
camera = createdSession.addCamera(
StreamConfiguration(videoQuality = VideoQuality.MEDIUM, frameRate = 24),
).getOrElse { error ->
throw IllegalStateException(error.description)
}.also { addedCamera ->
addedCamera.stream.start().getOrElse { error ->
throw IllegalStateException(error.description)
}
}
}
}
viewModelScope.launch {
camera?.stream?.videoStream?.collect { frame ->
// Render preview
}
}
fun capturePhoto() {
viewModelScope.launch {
camera?.stream?.capturePhoto()
?.onSuccess { photoData ->
savePhoto(photoData.data)
}
?.onFailure { error, _ ->
showCaptureError(error.description)
}
}
}
fun stopCameraSession() {
camera?.stop()
session?.stop()
camera = null
session = null
}
Use MockDeviceKit to simulate linking glasses, permission state, and camera media without physical hardware. See MockDevice Testing for setup details.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dat, meta-wearables, android, camera-streaming, session-management
npx claudepluginhub farodamemoria/android --plugin mwdat-android10 skills in this plugin
/camera-streamingSession and Stream capability setup, video frames, photo capture, resolution and frame rate configuration/dat-conventionsKotlin patterns, DatResult, session and capability conventions for DAT SDK Android development/debuggingCommon issues, Developer Mode, version compatibility, and session and stream diagnosis/display-accessDisplay capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback/getting-startedSDK setup, Gradle integration, AndroidManifest configuration, and first connection to Meta glasses/live-debugging-mcpUse this whenever debugging an Android DAT app with local DAT Inspector MCP tools, live device events, Meta AI app/device boundary issues, permissions, registration, sessions, streaming, or user reports that the app cannot communicate with glasses.Other plugins' skills for the same job