Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
facebook avatar

Sample App Guide

  • 5 installs
  • 340 repo stars
  • Updated August 3, 2026
  • facebook/meta-wearables-dat-android

Walks through building a complete Android DAT app with registration, session creation, camera streaming, and photo capture, paired with the CameraAccess sample.

About

Guides building a full Android DAT app that combines registration, sessions, camera streaming, and photo capture. Android developers use it as an end-to-end blueprint, alongside the CameraAccess sample, when assembling a working app.

  • End-to-end app structure and setup steps
  • Pairs with the official CameraAccess sample

Sample App Guide by the numbers

  • 5 all-time installs (skills.sh)
  • Ranked #828 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/facebook/meta-wearables-dat-android --skill sample-app-guide

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5
repo stars340
Last updatedAugust 3, 2026
Repositoryfacebook/meta-wearables-dat-android

What it does

Walks through building a complete Android DAT app with registration, session creation, camera streaming, and photo capture, paired with the CameraAccess sample.

Files

SKILL.mdMarkdownGitHub ↗

Sample App Guide (Android)

Build an Android DAT app with registration, sessions, camera streaming, and photo capture.

Pair this with the CameraAccess sample.

Project setup

1. Create an Android Studio app project. 2. Add the DAT Maven repository and dependencies. 3. Configure AndroidManifest.xml for registration callbacks and APPLICATION_ID. 4. Initialize Wearables in your Application.

Suggested app structure

app/src/main/java/com/example/myapp/
├── MyApplication.kt
├── MainActivity.kt
├── session/
│   └── SessionViewModel.kt
└── ui/
    ├── RegistrationScreen.kt
    └── CameraScreen.kt

Registration and session creation

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)
            }
        }
    }
}

Observe frames and capture photos

viewModelScope.launch {
    stream?.videoStream?.collect { frame ->
        // Render preview
    }
}

fun capturePhoto() {
    viewModelScope.launch {
        stream?.capturePhoto()
            ?.onSuccess { photoData ->
                savePhoto(photoData.data)
            }
            ?.onFailure { error, _ ->
                showCaptureError(error.description)
            }
    }
}

Shutdown

fun stopCameraSession() {
    stream?.stop()
    session?.stop()
    stream = null
    session = null
}

Testing with MockDeviceKit

Use MockDeviceKit to simulate linking glasses, permission state, and camera media without physical hardware. See MockDevice Testing for setup details.

Links

Related skills

Mobile Developmentfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.