The Meta Horizon Android Studio Plugin supports the development of Android apps for Quest devices by integrating Meta Horizon OS-specific functionality into the Android Studio IDE. For any Android app, it detects unsupported libraries and permissions. For Spatial SDK apps specifically, it also provides project templates, a Data Model Inspector, and component/system file templates.
The plugin runs in Android Studio, Google’s free IDE for Android development. While the plugin is distributed via JetBrains, you don’t need to sign up for IntelliJ or use any of their paid products.
Supported Android Studio versions
The plugin supports recent stable releases of Android Studio. When you open the plugin’s JetBrains Marketplace page with Android Studio installed, the page detects your Android Studio version and offers a compatible plugin build. If no compatible build is offered, your Android Studio version isn’t supported yet—update to a recent stable release (or install a supported version from the Android Studio archive) and try again.
Install the Meta Horizon Android Studio Plugin
You can install the Meta Horizon Android Studio Plugin from the JetBrains Marketplace, or through Android Studio directly.
Install from the JetBrains Marketplace
To install from the JetBrains Marketplace, follow these steps:
With Android Studio open, the Marketplace page detects your version and provides a quick install button.
Select the Install to Android Studio YOUR_VERSION button.
Go to Android Studio and click OK on the plugin installation prompt.
If prompted, restart Android Studio.
Install through Android Studio
To install through Android Studio, follow these steps:
Open Android Studio settings and go to Plugins.
On Windows and Linux, go to File > Settings > Plugins. On macOS, go to Android Studio > Settings > Plugins.
In the Plugins window, click Marketplace.
In the search bar, type Meta and select the Meta Horizon plugin.
If prompted, restart Android Studio.
Confirm installation
After restarting Android Studio, you’ll see a welcome dialog.
You will also notice a new tool window for Meta Horizon on the right-hand side.
Enabling and disabling the plugin
After you’ve installed Android Studio, you can disable or enable it in the Plugins menu where you installed the plugin.
Enable source code inspection
The Android Studio plugin tries to limit source code inspection to modules that Quest uses. Include the following tag in your AndroidManifest.xml to have the plugin detect libraries and permissions that Quest doesn’t support.
The plugin looks for the manifest file closest to a given source file. If your project has multiple AndroidManifest.xml files, you may need to add the tag to all of them.
Detect unsupported libraries
The plugin checks your code for Google Mobile Services (GMS) and other libraries that Quest doesn’t support. Warnings for each unsupported library appear inline in import list or in the Problems window. You can mouse over the problem and click “Learn More” to see how to replace this.
Detect unsupported permissions
The plugin marks unsupported permissions within the project’s AndroidManifest.xml files.
Spatial SDK features
Project templates
Using project templates, you can create a new Spatial SDK project. To use project templates in Android Studio, follow these steps.
In Android Studio, click File > New > New Spatial SDK Project.
The New Project window appears.
Fill out the fields, and then click Create.
Your new Spatial SDK project opens. It may take a few minutes to sync Gradle.
Data Model Inspector (DMI)
Debug your scene with the Data Model Inspector. This tool allows you to inspect and modify component data in real-time while your application is running, making it easier to understand scene hierarchy and troubleshoot issues.
Component and system file templates
Component and system file templates help you create new components and systems. To use the file templates in Android Studio, see Write a new component or Write a new system.
Open scenes in Meta Spatial Editor
For Spatial SDK projects, the plugin can open your scene files directly in Meta Spatial Editor. There are three ways to open a scene:
Meta Horizon tool window — In the Meta Horizon tool window, click Open Scene in Meta Spatial Editor. The plugin automatically finds the .metaspatial scene file and launches Meta Spatial Editor. This button is only visible for Spatial SDK projects (those with an app/scenes/ directory).
Context menu — Right-click on the scenes folder and select Open Scene in Meta Spatial Editor.
Tools menu — Go to Tools > Meta Horizon > Open Scene in Meta Spatial Editor.
Note: Meta Spatial Editor must be installed on your machine. If it is not installed, the plugin shows a notification with a download link. This feature is supported on macOS and Windows only.