App Deep Linking with Platform Solutions
Updated: Jul 15, 2024
This is a Platform SDK feature requiring Data Use Checkup
To use this or any other Platform SDK feature, you must complete a Data Use Checkup (DUC). The DUC ensures that you comply with Developer Policies. It requires an administrator from your organization to certify that your use of user data aligns with platform guidelines. Until the app review team reviews and approves your DUC, platform features are only available for test users.App deep linking allows you to launch users directly into an app event or gameplay mode.
For example, you may have two separate applications, one single player and one multiplayer. If you implement App Deep linking in both apps, a user can join a multiplayer session from the single player app.
Deep linking requires an integration in both the app the request originates from, and the target app.
The next sections describes the implementation required for both apps.
Originating App Implementation
The originating app will call the LaunchOtherApp
method to launch the other application.
ovr_Application_LaunchOtherApp(appId, deeplink_options)
This method launches a different application in the user’s library. If the user does not have that application installed, they will be taken to that app’s page in the Meta Horizon Store.
Parameters:
Parameter | Description |
---|
appID
| The ID of the app to launch |
deeplink_options
| Additional configuration for this requests. Optional. |
For example, a request from a native application may resemble:
ovrApplicationOptionsHandle options = ovr_ApplicationOptions_Create();
ovr_ApplicationOptions_SetDeeplinkMessage(options, "abc");
ovr_Application_LaunchOtherApp(appId, options);
Once the request has been made, you should check to see if the target application launched successfully. The request will only succeed if the user is both entitled to (owns) and has installed the target app. If the user does not own the app, or has not downloaded the app, they will be directed to the product information page in the 2D Store where they can purchase and download the app.
Note: Link PC-VR only - After receiving the notification that the target app was launched successfully, you must quit the originating app yourself before the target app can continue.
Receiving App Implementation
Apps launched by
ovr_Application_LaunchOtherApp(appId, deeplink_options)
will launch as normal, and will receive a notification of type
ovrMessage_Notification_ApplicationLifecycle_LaunchIntentChanged
on the message queue.
On a native app, startup check for this notification and call ovr_ApplicationLifecycle_GetLaunchDetails()
to retrieve information about how the app was launched.
All notifications generated by this API will have a launch type of DEEPLINK
. This information allows you to direct the user to the proper app location.
If the user is on Link PC-VR device and the user does not own the app, the LaunchOtherApp
request returns an error, which should be handled appropriately in your code. If the user does own the app, after receiving the notification that the target app was launched successfully, you must quit the originating app yourself before the target app can continue.
If the user is on a Quest or Quest 2 device, and the user does not own the app, or has not downloaded the app, they will be directed to the product information page in the Store where they can purchase and download the app.