Skip to content
Development
Skill

/hz-android-2d-porting

Guides porting existing Android 2D apps to Meta VR and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile Android app for Meta VR. For UI design decisions, use hz-panel-designer if available. Build path: Standard Android; use

From plugin
meta-vr
24336 skills1 MCP

Claude Code

$ npx -y skills add meta-quest/agentic-tools --skill hz-android-2d-porting --agent claude-code

SKILL.md

hz-android-2d-porting.SKILL.md
name: hz-android-2d-porting
license: Apache-2.0
description: "Guides porting existing Android 2D apps to Meta VR and Horizon OS — input adaptation, panel layout, and design requirements. Use when adapting a mobile Android app for Meta VR. For UI design decisions, use hz-panel-designer if available. Build path: Standard Android; use hz-quest-verify-first if the build path is unclear."
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 VR headsets
  • Adapting a mobile Android app for Horizon OS panels
  • Troubleshooting input, layout, or compatibility issues with a 2D app on Meta VR devices
  • 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 Meta VR devices 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. **Compatibility**: Dependencies and permissions must work without Google Play Services or unavailable hardware. 4. **Design and performance**: Apps must meet Horizon Store requirements on mobile hardware.

The goal of porting is to make the app feel native to the Meta VR experience while preserving existing functionality.

Porting Workflow

Step 1: Initial Testing

Build and install the existing app with its normal Android workflow. Android Studio, Gradle, and `adb` all work with a connected Meta VR device:

./gradlew installDebug
adb shell am start -n com.example.yourapp/.MainActivity

Prefer `metavr app install <apk>` and `metavr app launch <package>` over raw adb here, then stream `metavr adb logcat --follow` during this first run. Note any immediate crashes, black screens, input problems, or layout breakage.

Step 2: Compatibility Audit

Check whether the app depends on Google Play Services, unsupported hardware, or prohibited permissions before changing its UI. Make unsupported features optional or replace them with Horizon OS alternatives. See [Compatibility Requirements](references/compatibility-requirements.md).

Step 3: 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 4: 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 Android layouts and window-size breakpoints. See [Panel Layout Reference](references/panel-layout.md).

Step 5: 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 6: 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 Meta Spatial Simulator for rapid desktop iteration, then validate on-device with the Meta Horizon OS Android Studio plugin or normal ADB tooling. Keep `metavr adb logcat --follow` running during each input pass — it catches input errors that don't visibly crash.

Step 7: Store Submission

Before submitting to the Horizon Store:

  • Verify all [Compatibility Requirements](references/compatibility-requirements.md)
  • Test on at least Quest 3, Quest 3S, and Quest 2 (if targeting them), plus Meta VR Glasses
  • 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 | | React Native | Supported | Uses the standard Android application path | | 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 | |---|---|---| | 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 | | Multiple app-owned panels | Limited | Use the current public multi-panel guidance when available | | Google Play Services | Not available | Use Meta equivalents or alternatives | | ARCore | Not available | Use Meta Spatial SDK for spatial features | | Mult

Read more
@meta-quest
Ships withmeta-vr

Agentic skills and tools for Meta VR and Horizon OS development.

24336 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
243
Star history of meta-quest/agentic-tools on GitHub, a chart by star-history.com

Other skills on meta-vr.

hz-api-upgrade

hz-api-upgrade

Upgrades Meta VR apps to newer Horizon OS SDK versions — migration guides, deprecated API replacements, changelog. Use when…

@meta-quest@meta-questInstall Skill
hz-immersive-designer

hz-immersive-designer

Guides design of comfortable, intuitive VR/MR experiences for Meta VR and Horizon OS — comfort guidelines, interaction patterns,…

@meta-quest@meta-questInstall Skill
hz-iwsdk-webxr

hz-iwsdk-webxr

Builds WebXR experiences for Meta VR and Horizon OS using the Immersive Web SDK (IWSDK) — ECS architecture, Three.js integration,…

@meta-quest@meta-questInstall Skill
hz-metavrx-layout-sdk

hz-metavrx-layout-sdk

Build multi-window Meta Horizon OS experiences with the MetaVrx Layout SDK in Jetpack Compose or React Native. Covers framework…

@meta-quest@meta-questInstall Skill
hz-metavrx-ui-set

hz-metavrx-ui-set

Builds app UI for Meta VR and Horizon OS with the MetaVrx UI Set, a Jetpack Compose component library and design system. Covers…

@meta-quest@meta-questInstall Skill
hz-new-project-creation

hz-new-project-creatio…

Scaffolds new Meta VR and Horizon OS projects after the build path is selected — Standard Android, Meta Spatial SDK, Unity,…

@meta-quest@meta-questInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about hz-android-2d-porting.

Which coding agents can use hz-android-2d-porting?
hz-android-2d-porting installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.