meta-wearables-dat-integration
Integrate or review the native Meta Wearables Device Access Toolkit (DAT) in an iOS (Swift, SPM) or Android (Kotlin, Gradle/Maven) companion app — package and artifact resolution, Info.plist or Manifest configuration, registration, permissions, URL/intent callbacks, device sessions, typed state and errors, MockDevice fixtures, 0.9 migrations, and the Android API atlas. Use when adding, upgrading, or reviewing DAT iOS or DAT Android code, resolving an exact DAT symbol or artifact, or comparing iOS and Android parity.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- meta-wearables-dat-integration
- description
- Integrate or review the native Meta Wearables Device Access Toolkit (DAT) in an iOS (Swift, SPM) or Android (Kotlin, Gradle/Maven) companion app — package and artifact resolution, Info.plist or Manifest configuration, registration, permissions, URL/intent callbacks, device sessions, typed state and errors, MockDevice fixtures, 0.9 migrations, and the Android API atlas. Use when adding, upgrading, or reviewing DAT iOS or DAT Android code, resolving an exact DAT symbol or artifact, or comparing iOS and Android parity.
- allowed-tools
- Read, Grep, Glob
- last_verified
- 1787356800000
02 资源文件 3
- 参考文档references/android-api-migration.md2.7 KB
- 参考文档references/android-surface-contract.md6.1 KB
- 参考文档references/ios-integration.md4.8 KB
03 SKILL.md 正文
Meta Wearables DAT integration
Overview
Build the smallest native adapter around the official DAT package for each platform. Keep registration, permission, and session state out of view code, keep the phone useful without glasses, and trace every SDK assumption to a pinned package or artifact. iOS and Android are separate integrations: SPM products versus Maven artifacts, Swift throws/async streams versus DatResult and Flow.
Apply the shared rules — evidence ladder, device labels, secrets, claims.
Read before acting
- Inspect the real target first: Xcode project, deployment target, package graph,
Info.plist, entitlements, privacy manifest; or Gradle wrapper/version catalog, resolved Maven artifacts, Manifest, min/target SDK, R8 rules. Record existing adapters. - Read registration, permissions, and configuration, MockDevice testing, and application architecture before placing the adapter behind shared product state.
- iOS: read DAT iOS foundations, the iOS surface map, and iOS integration details.
- Android: read Android parity and boundaries, the Android API atlas route, the Android 0.9 migration fixture, and the Android surface contract.
- Pin the official DAT iOS or DAT Android tag and check its changelog against the resolved package. Prefer the release tag over moving
main.
Integration workflow
- Freeze the tuple: platform, OS/min SDK, toolchain, exact DAT tag or four Maven versions, Meta AI app version, device wording, requested capability.
- Resolve only the products or artifacts the feature needs. Android lanes are
mwdat-core,mwdat-camera,mwdat-display,mwdat-mockdevice; never copy an iOS product name into Gradle or invent a module. - Initialize once (
Wearables.initialize(context)on Android) and expose explicit states: unconfigured, registration required, registering, permission required, ready, starting session, connected, stopping, disconnected, unsupported, denied, failed. - Put callback/deep-link configuration, permission requests, and registration recovery at the app-integration boundary. Views and composables only project state.
- Start a session only from an intentional user flow. Attach camera or Display only after the session starts; on exit, disconnect, doff/fold, error, or cancellation stop the capability, cancel collectors, then stop the session.
- Treat stream completion and typed failures as contract: test
stateStream/errorStreamcompletion on iOS; on Android useDatResultfailures instead ofgetOrThrow()and collectFlow/StateFlowwith lifecycle-aware cancellation. - Audit analytics/crash opt-outs, always-on device-access management, privacy disclosures, and package credentials against the selected release's wording.
- Add MockDevice fixtures and an unavailable phone-only path before wiring camera, audio, or Display features.
0.9 migration traps
- Camera moved to
addCamera(config)→Camera.stream→Camera.stop(); the directaddStream/removeStreampath is gone on both platforms. - Android:
DatResultis now a Java-visible reference type; Display usesButtonGroup, localBitmap, and tap callbacks;DisplayComponent,VideoScope, andDAM_ENABLEDare historical. - Upstream
AGENTS.mdand plugin examples still show 0.8 coordinates andSession; the 0.9.0 changelog and DisplayAccess sample establishDeviceSession. Resolve the name from the selected artifact. - iOS:
ListenerTokenBag, synchronousMockCameraKit.setCameraFeed,hingesClosed,DeviceType.supportsDisplay, and the raised minimum OS. See iOS details.
These are review prompts, not permission to use a symbol without compiling against the selected tag.
Android API atlas
For exact-symbol, parity, or full-SDK requests, resolve symbols in authority order: resolved artifact and generated API reference, then the same release's changelog and samples, then the Developer Center, then moving main and upstream skills. Record disagreements as source-conflict and emit rows using the Android surface contract. Load normalized rows from the source-pinned surface manifest and filter to platform, artifact, and status first.
Starters
Begin from the source-aligned camera and MockDevice seeds in implementation recipes; each platform reference lists them. They are seeds, not proof.
Hard boundaries
- No registration or permission calls in a view initializer; pairing is not permanent authorization — model denial, revocation, and re-registration.
- Never call the Android SDK "full" without checking all four artifacts against the capability/conflict matrix.
- Never treat an
AGENTS.md, plugin role,llms.txt, MCP answer, or sample as a compiled artifact. - Never assume iOS background execution, Meta AI voice commands, or raw glasses audio because DAT exists.
Required output
- Pinned package tag/commit or exact Maven coordinates, with the resolved module graph.
- Target configuration audit: identity, callbacks, permissions, credentials handling, privacy settings.
- Adapter state machine and lifecycle/teardown table (
DatResult/Flowcontract on Android). - 0.9 migration table with the selected package's compile outcome.
- MockDevice and build-test plan, plus the phone-only unavailable path.
- iOS/Android parity rows labeled same-concept or platform-specific.
- Unresolved API, device-generation, and release-channel questions.
Related skills
Camera, audio, Display, input, and transport: device capabilities. iOS atlas and full-SDK audit: SDK audit. Failures and readiness: diagnostics. Attestation and release: trust and release. Hardware proof: device proof.
04 同仓库更多 Skills
no-description
暂无简介
good-skill
Fixture skill that satisfies every rule.
broken-link
Links to a reference file that does not exist.
Bad_Name
Name violates the kebab-case rule and does not match the directory.
skill-authoring
Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.
weigh-bags
Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts/reconcile.py.