원클릭으로
permissions-registration
App registration with Meta AI and device permission flows
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
App registration with Meta AI and device permission flows
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Session and Stream capability setup, video frames, photo capture, resolution and frame rate configuration
Kotlin patterns, DatResult, session and capability conventions for DAT SDK Android development
Common issues, Developer Mode, version compatibility, and session and stream diagnosis
Display capability setup, display-capable device selection, UI DSL, icons, buttons, images, and video playback
SDK setup, Gradle integration, AndroidManifest configuration, and first connection to Meta glasses
MockDeviceKit for testing without physical glasses hardware
| name | permissions-registration |
| description | App registration with Meta AI and device permission flows |
Register your app with Meta AI, then request the device permissions it needs.
The DAT SDK separates two steps:
Both flows depend on the Meta AI app being installed on the phone.
Wearables.startRegistration(activity)
Observe registration state:
lifecycleScope.launch {
Wearables.registrationState.collect { state ->
// Update your registration UI
}
}
To unregister:
Wearables.startUnregistration(activity)
checkPermissionStatus(...) is a suspend API that returns a DatResult.
lifecycleScope.launch {
Wearables.checkPermissionStatus(Permission.CAMERA)
.onSuccess { status ->
if (status == PermissionStatus.Granted) {
startStreaming()
}
}
.onFailure { error, _ ->
showPermissionError(error.description)
}
}
Use Wearables.RequestPermissionContract() with the Activity Result API:
private val permissionLauncher =
registerForActivityResult(Wearables.RequestPermissionContract()) { result ->
result.onSuccess { status ->
if (status == PermissionStatus.Granted) {
startStreaming()
}
}.onFailure { error, _ ->
showPermissionError(error.description)
}
}
fun requestCameraPermission() {
permissionLauncher.launch(Permission.CAMERA)
}
Users can allow once or allow always through the Meta AI flow.
| Mode | Registration behavior |
|---|---|
| Developer Mode | Use mwdat_application_id = 0 and mwdat_client_token = 0 manifest placeholders for local development |
| Production | Use the application ID and client token assigned in the Wearables Developer Center |
For development builds, enable Developer Mode in the Meta AI app before testing registration and permissions.
AndroidManifest.xml