
Camera Streaming
- 5 installs
- 340 repo stars
- Updated August 3, 2026
- facebook/meta-wearables-dat-android
Sets up Session and Stream on Android to receive camera video frames and capture photos from Meta glasses, with resolution and frame-rate configuration.
About
Shows how to create a DAT Session and attach a camera Stream on Android to receive video frames and capture photos from Meta glasses. Android developers use it when adding camera streaming to a Meta Wearables DAT SDK app.
- Session + Stream + StreamConfiguration for camera
- Kotlin frame handling and PhotoData capture
Camera Streaming 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 camera-streamingAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 5 |
|---|---|
| repo stars | ★ 340 |
| Last updated | August 3, 2026 |
| Repository | facebook/meta-wearables-dat-android ↗ |
What it does
Sets up Session and Stream on Android to receive camera video frames and capture photos from Meta glasses, with resolution and frame-rate configuration.
Files
Camera Streaming (Android)
Use a Session and attached Stream to receive frames and capture photos.
Key concepts
- Session: Device connection lifecycle created through
Wearables.createSession(...) - Stream: Camera capability attached to a session with
session.addStream(...) - StreamConfiguration: Resolution and frame rate configuration for the stream
- PhotoData: Still image captured from glasses while streaming
Create a session and attach a stream
import com.meta.wearable.dat.camera.Stream
import com.meta.wearable.dat.camera.addStream
import com.meta.wearable.dat.camera.types.StreamConfiguration
import com.meta.wearable.dat.camera.types.VideoQuality
import com.meta.wearable.dat.core.Wearables
import com.meta.wearable.dat.core.selectors.AutoDeviceSelector
val session = Wearables.createSession(AutoDeviceSelector()).getOrElse { error ->
throw IllegalStateException(error.description)
}
session.start()
val stream: Stream = session.addStream(
StreamConfiguration(
videoQuality = VideoQuality.MEDIUM,
frameRate = 24,
),
).getOrElse { error ->
throw IllegalStateException(error.description)
}
stream.start().getOrElse { error ->
throw IllegalStateException(error.description)
}Resolution options
| Quality | Size |
|---|---|
VideoQuality.HIGH | 720 x 1280 |
VideoQuality.MEDIUM | 504 x 896 |
VideoQuality.LOW | 360 x 640 |
Frame rate options
Valid values: 2, 7, 15, 24, 30 FPS.
Lower resolution and frame rate usually produce better visual quality per frame over Bluetooth.
Observe stream state
StreamState transitions: STOPPED -> STARTING -> STARTED -> STREAMING -> STOPPING -> STOPPED -> CLOSED
lifecycleScope.launch {
stream.state.collect { state ->
when (state) {
StreamState.STREAMING -> {
// Frames are flowing
}
StreamState.STOPPED -> {
// Streaming ended
}
StreamState.CLOSED -> {
// Stream fully closed
}
else -> Unit
}
}
}Receive frames
lifecycleScope.launch {
stream.videoStream.collect { frame ->
updatePreview(frame)
}
}Capture a photo
lifecycleScope.launch {
stream.capturePhoto()
.onSuccess { photoData ->
val imageBytes = photoData.data
savePhoto(imageBytes)
}
.onFailure { error, _ ->
showCaptureError(error.description)
}
}Clean up
Stop the stream when you no longer need camera data, then stop the parent session if the device interaction is finished.
stream.stop()
session.stop()If you want to remove the capability entirely before re-adding it, call session.removeStream().