horizon-platform-sdk-samples

Horizon Platform SDK — Android Sample Apps

License: MIT Meta Quest

Standalone Android sample apps demonstrating each Horizon Platform SDK API.

What is this?

This repository contains 16 standalone Gradle projects, one for each public Horizon Platform SDK API. Each sample is a minimal, self-contained Android app built with Kotlin and Jetpack Compose that shows how to integrate and call a single Platform SDK API on Meta Quest devices running Horizon OS.

These samples are designed for third-party developers building apps for the Meta Quest ecosystem. Each app follows the same architecture (MVVM with Compose) so you can focus on the API usage rather than boilerplate.

Prerequisites

Getting started

  1. Clone this repository.
  2. Open any sample directory in Android Studio (e.g., users/).
  3. In app/src/main/java/.../MainActivity.kt, replace the APPLICATION_ID property with your own Application ID:
    private val APPLICATION_ID = "your-application-id-here"
    
  4. Build and run on your Quest device:
    ./gradlew assembleDebug
    adb install app/build/outputs/apk/debug/app-debug.apk
    

Sample apps

Sample API Description
abusereport/ Abuse Report Listen for abuse report button press events
achievements/ Achievements Unlock and query achievement definitions and progress
application/ Application Query application metadata and version info
applicationlifecycle/ Application Lifecycle Monitor app lifecycle state transitions
assetfile/ Asset File Download and manage downloadable content (DLC) asset files
consent/ Consent Check and request user consent status
deviceapplicationintegrity/ Device Application Integrity Verify device and application integrity
grouppresence/ Group Presence Set and manage group presence for multiplayer sessions
iap/ In-App Purchases Browse products, make purchases, and verify ownership
languagepack/ Language Pack Query and manage localized language packs
leaderboards/ Leaderboards Submit scores and query leaderboard rankings
notifications/ Notifications Send and manage in-app notifications
rateandreview/ Rate and Review Request users to rate and review the app
richpresence/ Rich Presence Set detailed presence info visible to friends
useragecategory/ User Age Category Query the user’s age category for content gating
users/ Users Retrieve user profile information

Project structure

Each sample follows an identical layout:

<sample>/
├── app/
│   ├── build.gradle.kts              # App build config with SDK dependency
│   ├── src/
│   │   ├── main/
│   │   │   ├── AndroidManifest.xml
│   │   │   └── java/.../
│   │   │       ├── MainActivity.kt   # Entry point — SDK init + Compose UI
│   │   │       └── *ViewModel.kt     # Business logic + UI state
│   │   └── test/                     # Unit tests
│   └── testapps.keystore             # Shared signing key for dev builds
├── build.gradle.kts                  # Root build file
├── settings.gradle.kts
├── gradle/
│   └── libs.versions.toml            # Version catalog
├── gradlew
└── gradlew.bat

Tech stack

Contributing

We welcome contributions! Please read our Contributing Guide for details on how to submit pull requests, report issues, and contribute to the project.

Code of Conduct

This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource-conduct@meta.com.

License

MIT — see LICENSE for details.

Copyright (c) 2025 Meta Platforms, Inc.

AI coding agents

This repo is wired up for AI coding agents — AGENTS.md, .vscode/extensions.json, .mcp.json, .cursor/rules/, and a few client-specific dotfiles surface the Meta Horizon VS Code/Cursor extension, the hzdb MCP server, and the Meta Quest skill set automatically.

Full toolchain, including Android skills and per-client install instructions: github.com/meta-quest/agentic-tools.