Help us improve
Share bugs, ideas, or general feedback.
From mwdat-android
Guides building an Android DAT app with registration, camera sessions, streaming, and photo capture using Meta Wearables SDK.
npx claudepluginhub facebook/meta-wearables-dat-android --plugin mwdat-androidHow this skill is triggered — by the user, by Claude, or both
Slash command
/mwdat-android:sample-app-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build an Android DAT app with registration, sessions, camera streaming, and photo capture.
Guides building an iOS DAT app with camera streaming and photo capture, covering project setup, SDK initialization, and ViewModel architecture.
Walks through SDK setup, Gradle integration, AndroidManifest configuration, and first connection to Meta glasses using the Meta Wearables Device Access Toolkit.
Creates complete webapps for Meta Display Glasses with D-pad navigation, EMG input, and 600x600 dark-theme display. Useful when starting a new smart glasses project or scaffolding a glasses app.
Share bugs, ideas, or general feedback.
Build an Android DAT app with registration, sessions, camera streaming, and photo capture.
Pair this with the CameraAccess sample.
AndroidManifest.xml for registration callbacks and APPLICATION_ID.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 stream: Stream? = null
fun startCameraSession() {
val createdSession = Wearables.createSession(AutoDeviceSelector()).getOrElse { error ->
throw IllegalStateException(error.description)
}
createdSession.start()
session = createdSession
stream = createdSession.addStream(
StreamConfiguration(videoQuality = VideoQuality.MEDIUM, frameRate = 24),
).getOrElse { error ->
throw IllegalStateException(error.description)
}.also { addedStream ->
addedStream.start().getOrElse { error ->
throw IllegalStateException(error.description)
}
}
}
}
viewModelScope.launch {
stream?.videoStream?.collect { frame ->
// Render preview
}
}
fun capturePhoto() {
viewModelScope.launch {
stream?.capturePhoto()
?.onSuccess { photoData ->
savePhoto(photoData.data)
}
?.onFailure { error, _ ->
showCaptureError(error.description)
}
}
}
fun stopCameraSession() {
stream?.stop()
session?.stop()
stream = null
session = null
}
Use MockDeviceKit to simulate linking glasses, permission state, and camera media without physical hardware. See MockDevice Testing for setup details.