Develop

Test with Platform SDK

Updated: Sep 5, 2026
VR Platform SDK is offered in a set of Kotlin packages you can integrate in your Android app. Each of these features can be used independently, but using multiple in combination provides more engaging VR experiences.
See Meta Spatial Simulator for the simulator itself. VR Platform SDK is supported on Meta Spatial Simulator as a sandbox for testing Platform SDK APIs with local sample data. For more information about how the test environment functions, see Spatial Simulator test environment.
Additional interactions to the environment are available via a command-line interface (CLI). For more information about the CLI, see Spatial Simulator CLI.
To reset local sample data to its default state, run:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"common.reset_data\""

Supported features

Spatial Simulator supports the Platform SDK APIs listed below, but support is not universal.
The tables use four standard labels for recurring simulator behavior. A row that also opens a dialog states that after the label. A row whose behavior does not fit a label describes it in full.
  • Backend request: Calls the Meta backend when you are signed in. Returns an authentication error when signed out.
  • Fixed response: Returns a fixed response. Does not evaluate the request.
  • Saved locally: Reads and writes local sample data. Persists across calls.
  • adb event: Delivers a result only when you send the event over adb.

Group Presence

Use Group Presence to add multiplayer features and presence to your Android apps.
APIBehavior in Spatial Simulator
Opens a system dialog that simulates the headset experience.
Opens a system dialog that simulates the headset experience.
Returns all users who are friends of the logged in user and filters out any users who have been blocked. From the spatial simulator default catalog, these users should initially include all users besides Lancelot and Thorne.
 
 
 
 
 
 
Returns no results until you call sendInvites, which starts tracking invites so this API returns them.
Send an invite to the recipient ID, which can be accepted via CLI command.
 
This is a notification based API that can be triggered through the CLI command. Begin by listening for the notification by calling the joinIntentReceived API.

IAP (In-App Purchases)

APIBehavior in Spatial Simulator
Returns products from the default catalog which have matching SKU names as the names passed in. Create more SKUs by using the CLI command iap.create_product.
Opens a system dialog that simulates the checkout dialog on the headset. Completing the checkout flow purchases the item.
 
Returns same set of purchases as getViewerPurchases
Consumes a consumable type purchase. Must be a valid purchase which can be obtained from Iap.getViewerPurchases.

Users

Application

APIBehavior in Spatial Simulator
Opens a dialog. Unlike the headset, the Spatial Simulator does not launch a different application in the user’s library.
Returns the same information regardless of the calling application.

Application Lifecycle

User Age Category

APIBehavior in Spatial Simulator
Backend request.

Known limitations

Other known limitations of the VR Platform SDK integration on Spatial Simulator include:
  • Local sample data remains keyed to the seeded test user, Sir Lancelot.
  • The database cannot be cleared entirely. It can only be reset to its default state using CLI commands.
  • UI dialogs are simplified simulations of the actual device experience.
  • Some APIs use local sample data. See the tables above for the behavior of each API.