/hz-android-2d-porting
Guides porting existing Android 2D apps to Meta Quest and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile Android app for Quest.
$ npx -y skills add meta-quest/agentic-tools --skill hz-android-2d-porting --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/hz-android-2d-porting
Context preview
The summary Claude sees to decide when to auto-load this skill.
Guides porting existing Android 2D apps to Meta Quest and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile Android app for Quest.
SKILL.md
hz-android-2d-porting.SKILL.mdname: hz-android-2d-porting
license: Apache-2.0
description: Guides porting existing Android 2D apps to Meta Quest and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile Android app for Quest.
allowed-tools: Bash(metavr:*) Bash(hzdb:*)
Android 2D App Porting to Horizon OS
When to Use
Use this skill when:
- Porting an existing Android 2D app to run on Meta Quest headsets
- Adapting a mobile Android app for Horizon OS panels
- Troubleshooting input, layout, or compatibility issues with a 2D app on Quest
- Preparing an Android app for Horizon Store submission
- Evaluating whether an existing Android app is compatible with Horizon OS
Overview
Horizon OS is built on Android (AOSP) and can run standard Android applications inside **panels** -- floating 2D windows positioned in 3D space. Most well-built Android apps work on Quest with minimal changes, but several areas require attention:
1. **Input**: There is no touchscreen. Users interact via controller pointer (ray-casting), hand tracking, or connected peripherals. 2. **Layout**: Apps run in resizable panels, not full-screen on a fixed display. 3. **Design**: Apps must meet Horizon OS design requirements for Horizon Store approval. 4. **Performance**: Quest uses a mobile GPU (Adreno) with thermal constraints.
The goal of porting is to make the app feel native to the Quest experience while preserving existing functionality.
Porting Workflow
Step 1: Initial Testing
Invoke metavr (the Quest device CLI) via `metavr <args>`. The command is published as the npm package `metavr`, so if `metavr` is not on PATH you can run the same CLI via `npx -y metavr <args>` — no global install needed; npx fetches the latest published version on demand.
The examples in this doc call `metavr` directly; the `npx -y metavr <args>` form above is the equivalent when `metavr` is not on PATH (the published npm package is still `metavr`).
Install the existing APK on a connected Quest device and test basic functionality:
metavr app install path/to/your-app.apk
metavr app launch com.example.yourapp
Note any immediate issues: crashes, black screens, input problems, or layout breakage.
Step 2: Input Adaptation
The most common porting issue is input. Touch events are translated from the controller pointer, but:
- **Hover states** are now visible (users point before clicking)
- **Scrolling** uses the thumbstick, not swipe gestures
- **Multi-touch** gestures (pinch-to-zoom) do not translate directly
- **Tap targets** must be large enough for pointer accuracy (48dp minimum)
See [Input Adaptation Reference](references/input-adaptation.md) for detailed guidance.
Step 3: Layout Adjustment
Panels are resizable and can have various aspect ratios. Your app must handle:
- Dynamic width and height changes
- Landscape and portrait orientations
- Different effective DPI values
Use responsive layout strategies such as `ConstraintLayout` or Jetpack Compose. See [Panel Layout Reference](references/panel-layout.md).
Step 4: Gradle and Manifest Updates
Update your build configuration to target Horizon OS:
// build.gradle.kts
android {
defaultConfig {
minSdk = 29 // Android 10 minimum
targetSdk = 34 // API 34 or higher required for all new 2D panel apps
}
}Add required manifest entries for device targeting. See [Gradle Setup Reference](references/gradle-setup.md).
Step 5: Input Testing
Test with all supported input methods:
- **Controller**: point-and-click, thumbstick scroll, trigger tap
- **Hand tracking**: pinch-to-select, hand scroll
- **Keyboard/mouse**: Bluetooth peripherals, system keyboard for text fields
Use the XR Simulator for rapid iteration, then validate on-device.
Step 6: Store Submission
Before submitting to the Horizon Store:
- Verify all [Compatibility Requirements](references/compatibility-requirements.md)
- Test on at least Quest 3 and Quest 2 (if targeting both)
- Confirm the app works in both passthrough and immersive home environments
- Review Meta's content policies and technical requirements
Quick Compatibility Check
Works on Horizon OS
| Feature | Status | Notes | |---|---|---| | Standard Android Views | Supported | TextView, RecyclerView, etc. | | Jetpack Compose | Supported | Full Compose UI toolkit | | WebView | Supported | Chromium-based | | Media playback (ExoPlayer) | Supported | Video and audio | | Networking (HTTP, WebSocket) | Supported | Wi-Fi connectivity | | Room / SQLite | Supported | Local database | | WorkManager | Supported | Background tasks | | Notifications | Supported | Horizon OS notification panel | | Bluetooth (peripherals) | Supported | Keyboard, mouse, gamepad | | Android Accessibility APIs | Supported | TalkBack equivalent available |
Restricted or Unavailable
| Feature | Status | Notes | |---|---|---| | Camera (front-facing) | Not available | No standard camera in 2D mode | | Telephony / SMS | Not available | No cellular radio | | NFC | Not available | No NFC hardware | | GPS / Fine location | Limited | Wi-Fi-based location only | | Fingerprint / BiometricPrompt | Not available | Use Meta account auth instead | | Split-screen (multi-window) | Limited | Use Spatial SDK panels instead | | Google Play Services | Not available | Use Meta equivalents or alternatives | | ARCore | Not available | Use Meta Spatial SDK for spatial features | | Multi-touch gestures | Limited | Single pointer from controller |
Common Issues and Fixes
| Issue | Cause | Fix | |---|---|---| | App crashes on launch | Missing Google Play Services dependency | Remove or make GMS optional | | Buttons too small to tap | Touch targets under 48dp | Increase minimum tap target size | | No scroll in lists | Swipe-based scroll not triggered | Ensure `RecyclerView`/`LazyColumn` handles generic scroll events | | Keyboard doesn't appear | Custom input field not using `InputConnection
Read more
name: hz-android-2d-porting license: Apache-2.0 description: Guides porting existing Android 2D apps to Meta Quest and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile Android app for Quest. allowed-tools: Bash(metavr:*) Bash(hzdb:*)
Android 2D App Porting to Horizon OS
When to Use
Use this skill when:
- Porting an existing Android 2D app to run on Meta Quest headsets
- Adapting a mobile Android app for Horizon OS panels
- Troubleshooting input, layout, or compatibility issues with a 2D app on Quest
- Preparing an Android app for Horizon Store submission
- Evaluating whether an existing Android app is compatible with Horizon OS
Overview
Horizon OS is built on Android (AOSP) and can run standard Android applications inside **panels** -- floating 2D windows positioned in 3D space. Most well-built Android apps work on Quest with minimal changes, but several areas require attention:
1. **Input**: There is no touchscreen. Users interact via controller pointer (ray-casting), hand tracking, or connected peripherals. 2. **Layout**: Apps run in resizable panels, not full-screen on a fixed display. 3. **Design**: Apps must meet Horizon OS design requirements for Horizon Store approval. 4. **Performance**: Quest uses a mobile GPU (Adreno) with thermal constraints.
The goal of porting is to make the app feel native to the Quest experience while preserving existing functionality.
Porting Workflow
Step 1: Initial Testing
Invoke metavr (the Quest device CLI) via `metavr <args>`. The command is published as the npm package `metavr`, so if `metavr` is not on PATH you can run the same CLI via `npx -y metavr <args>` — no global install needed; npx fetches the latest published version on demand.
The examples in this doc call `metavr` directly; the `npx -y metavr <args>` form above is the equivalent when `metavr` is not on PATH (the published npm package is still `metavr`).
Install the existing APK on a connected Quest device and test basic functionality:
metavr app install path/to/your-app.apk metavr app launch com.example.yourapp
Note any immediate issues: crashes, black screens, input problems, or layout breakage.
Step 2: Input Adaptation
The most common porting issue is input. Touch events are translated from the controller pointer, but:
- **Hover states** are now visible (users point before clicking)
- **Scrolling** uses the thumbstick, not swipe gestures
- **Multi-touch** gestures (pinch-to-zoom) do not translate directly
- **Tap targets** must be large enough for pointer accuracy (48dp minimum)
See [Input Adaptation Reference](references/input-adaptation.md) for detailed guidance.
Step 3: Layout Adjustment
Panels are resizable and can have various aspect ratios. Your app must handle:
- Dynamic width and height changes
- Landscape and portrait orientations
- Different effective DPI values
Use responsive layout strategies such as `ConstraintLayout` or Jetpack Compose. See [Panel Layout Reference](references/panel-layout.md).
Step 4: Gradle and Manifest Updates
Update your build configuration to target Horizon OS:
// build.gradle.kts
android {
defaultConfig {
minSdk = 29 // Android 10 minimum
targetSdk = 34 // API 34 or higher required for all new 2D panel apps
}
}Add required manifest entries for device targeting. See [Gradle Setup Reference](references/gradle-setup.md).
Step 5: Input Testing
Test with all supported input methods:
- **Controller**: point-and-click, thumbstick scroll, trigger tap
- **Hand tracking**: pinch-to-select, hand scroll
- **Keyboard/mouse**: Bluetooth peripherals, system keyboard for text fields
Use the XR Simulator for rapid iteration, then validate on-device.
Step 6: Store Submission
Before submitting to the Horizon Store:
- Verify all [Compatibility Requirements](references/compatibility-requirements.md)
- Test on at least Quest 3 and Quest 2 (if targeting both)
- Confirm the app works in both passthrough and immersive home environments
- Review Meta's content policies and technical requirements
Quick Compatibility Check
Works on Horizon OS
| Feature | Status | Notes | |---|---|---| | Standard Android Views | Supported | TextView, RecyclerView, etc. | | Jetpack Compose | Supported | Full Compose UI toolkit | | WebView | Supported | Chromium-based | | Media playback (ExoPlayer) | Supported | Video and audio | | Networking (HTTP, WebSocket) | Supported | Wi-Fi connectivity | | Room / SQLite | Supported | Local database | | WorkManager | Supported | Background tasks | | Notifications | Supported | Horizon OS notification panel | | Bluetooth (peripherals) | Supported | Keyboard, mouse, gamepad | | Android Accessibility APIs | Supported | TalkBack equivalent available |
Restricted or Unavailable
| Feature | Status | Notes | |---|---|---| | Camera (front-facing) | Not available | No standard camera in 2D mode | | Telephony / SMS | Not available | No cellular radio | | NFC | Not available | No NFC hardware | | GPS / Fine location | Limited | Wi-Fi-based location only | | Fingerprint / BiometricPrompt | Not available | Use Meta account auth instead | | Split-screen (multi-window) | Limited | Use Spatial SDK panels instead | | Google Play Services | Not available | Use Meta equivalents or alternatives | | ARCore | Not available | Use Meta Spatial SDK for spatial features | | Multi-touch gestures | Limited | Single pointer from controller |
Common Issues and Fixes
| Issue | Cause | Fix | |---|---|---| | App crashes on launch | Missing Google Play Services dependency | Remove or make GMS optional | | Buttons too small to tap | Touch targets under 48dp | Increase minimum tap target size | | No scroll in lists | Swipe-based scroll not triggered | Ensure `RecyclerView`/`LazyColumn` handles generic scroll events | | Keyboard doesn't appear | Custom input field not using `InputConnection
Agentic skills and tools for Meta Quest and Horizon OS development.
Repo: meta-quest/agentic-tools
Other skills on meta-vr.
- /hz-api-upgrade
Upgrades Meta Quest apps to newer Horizon OS SDK versions — migration guides, deprecated API replacements, changelog. Use when updating SDK versions or fixing deprecated API warnings.
Open skill - /hz-immersive-designer
Guides design of comfortable, intuitive VR/MR experiences for Meta Quest and Horizon OS — comfort guidelines, interaction patterns, spatial layout, accessibility. Use during UX design review or when evaluating comfort and accessibility.
Open skill - /hz-iwsdk-webxr
Builds WebXR experiences for Meta Quest and Horizon OS using the Immersive Web SDK (IWSDK) — ECS architecture, Three.js integration, spatial UI. Use when creating web-based VR/MR apps for Quest Browser.
Open skill - /hz-new-project-creation
Scaffolds new Meta Quest and Horizon OS projects with recommended settings for Unity, Unreal, Android/Spatial SDK, or WebXR. Use when creating a new Quest app from scratch.
Open skill - /hz-perfetto-debug
Analyzes Meta Quest and Horizon OS VR performance using Perfetto traces — frame timing, CPU/GPU bottlenecks, render pass analysis. Use when profiling frame drops, jank, or thermal issues on Quest devices.
Open skill - /hz-platform-sdk
Guides integration of the Horizon Platform SDK for Meta Quest and Horizon OS Android/Kotlin apps — achievements, IAP, users, leaderboards, presence, notifications, abuse reporting, entitlements, asset files, application lifecycle, consent, device integrity, language packs, user
Open skill

