Loading...
Loading...
For 3P / EXTERNAL developers: guides interactive Horizon Platform SDK (PSDK) integration for Meta Quest and Horizon OS Android/Kotlin apps — analyzes the codebase, recommends public platform features, plans the integration, and validates on device. Uses the external toolchain (Gradle, metavr, a developers.meta.com / Rocksteady App ID). For 1P apps inside fbsource (buck, Chesterfield/ni, adb), use psdk_1p_onboarding_agent instead.
npx skill4agent add meta-quest/agentic-tools hz-psdk-integrationThis skill requires interactive mode. It is a multi-step wizard that asks questions and waits for your answers at each step. Do not run this skill with(non-interactive/print mode) — it will not work correctly. Use an interactive Claude Code session instead.claude -p
references/common-setup.md<feature>.mdleaderboards.mdiap.mdmetavr <args>metavrmetavrnpx -y metavr <args>Horizon Platform SDK (PSDK) is Meta's cross-platform SDK that gives Quest apps access to platform services. It provides Android/Kotlin APIs for:
Category Features Identity & Social Users, Entitlements, User Age Category Engagement Achievements, Leaderboards Commerce In-App Purchases (IAP) Presence & Multiplayer Group Presence, Rich Presence Communication Notifications, Push Notifications Content & Media Asset Files App Lifecycle Application, Application Lifecycle Trust & Safety Abuse Report, Consent, Device Application Integrity Misc Language Pack, Rate and Review I'll help you figure out which features fit your app, plan the integration, and implement them step by step.
appbuild.gradle.ktsbuild.gradleAndroidManifest.xml@Composable@Inject@Module@HiltAndroidAppApplicationActivitycom.meta.horizon.platform.sdkmetavr device list## Codebase Summary
- **Package**: com.example.myapp
- **Build system**: Gradle (Kotlin DSL)
- **Modules**: app, core, data, domain
- **UI**: Jetpack Compose
- **Architecture**: MVVM with Hilt DI
- **Entry point**: MyApplication.kt, MainActivity.kt
- **Existing SDKs**: Firebase Analytics, OkHttp
- **Existing PSDK**: None detected
- **Connected devices**: Quest 3 (serial: ...)
- **Key files inspected**: [list 5-10 files you actually read]| # | Feature | Why It Fits | Integration Surface | Complexity |
|---|---|---|---|---|
| 1 | Feature name | Reasoning based on their app | Where it hooks in | Low/Med/High |
| Feature | Questions |
|---|---|
| All features | App ID (numeric), validation method (Quest headset / XR Simulator), developer account set up? |
| Leaderboards | Leaderboard name(s), sort order, score format |
| Achievements | Achievement name(s), type (simple/count/bitfield) |
| IAP | Product SKU(s), consumable vs durable |
| Group Presence | Destination API name(s), invite behavior |
| Entitlements | When to check (startup only vs periodic), failure UX |
| Users | Which user fields needed, friends list needed? |
| Notifications | Notification types, action buttons |
<project-root>/psdk/plan/<feature-slug>-integration.md# <Feature Name> Integration Plan
## 1. Requirement Summary
> What we're integrating and why.
> **Complexity**: Simple | Complex
## 2. Open Questions
| # | Question | Context | Assumption | Answer | Status |
|---|----------|---------|------------|--------|--------|
| 1 | ... | ... | ... | _(fill in)_ | OPEN |
> Do NOT begin implementation while any question is OPEN.
## 3. File Changes
| Action | File Path | Description |
|--------|-----------|-------------|
| ADD | ... | ... |
| UPDATE | ... | ... |
## 4. Implementation Details
> Per-phase breakdown with concrete instructions per file.
## 5. Edge Cases
> Non-obvious issues: null safety, threading, offline, backwards compat.
## 6. Test Plan
### Unit Tests
| Test File | Test Case | Validates |
|-----------|-----------|-----------|
| ... | ... | ... |
### On-Device Validation (via metavr)
1. `metavr device list` — discover connected Quest headset
2. `./gradlew assembleDebug` — build the APK
3. `metavr app install ./app/build/outputs/apk/debug/app-debug.apk`
4. `metavr app launch <package-name>`
5. `metavr adb logcat -e <package-name> -n 200` — verify no crashes
6. `metavr capture screenshot -o psdk/plan/<feature>/screenshots/<name>.png`
## 7. Validation Checklist
- [ ] `./gradlew assembleDebug` succeeds
- [ ] `./gradlew lint` passes (no new warnings)
- [ ] All existing unit tests pass
- [ ] New unit tests pass
- [ ] On-device validation confirms expected behavior
- [ ] Screenshots saved to `psdk/plan/<feature>/screenshots/`
## Execution Log
> _(filled in during implementation)_
### Build Results
### Unit Test Results
### Device Validation Resultsreferences/leaderboards.md./gradlew assembleDebug./gradlew lint./gradlew ktlintCheck./gradlew test# Install the build
metavr app install ./app/build/outputs/apk/debug/app-debug.apk
# Launch the app
metavr app launch <package-name>
# Stream logs to verify behavior
metavr adb logcat -e <package-name> -f -n 0
# Capture screenshots as evidence
metavr capture screenshot -o psdk/plan/<feature>/screenshots/01_<screen>.pngreferences/architecture-patterns.md