System Deep Linking
Updated: Oct 9, 2024
System deep links allow your app to directly launch built-in apps that are part of the Meta Horizon operating system.
For instance, you can have users press a button in your app to open the store page for your new app, or open a web browser at a given URL.
Available System Deep Link Commands
Intent specifies which built-in app to launch. Additionally, URI is an optional field, accepted by some built-in apps, which launches them in specific states.
Action | Intent | URI |
---|
Open Browser | systemux://browser
| [any valid URL] |
Open Store | systemux://store
| [none] : Store front page
/item/[ID] : Store page for a given app/IAP
|
Open Settings | systemux://settings
| [none] : Settings main page
/hands : Settings page for hand tracking
/applications?package=com.X.Y : Settings page for an installed app whose Android package is com.X.Y
|
Open Files app | systemux://file-manager
| [none] : ‘Recents’ tab
/media/ : ‘Media’ tab
/downloads/ : ‘Downloads’ tab
|
Open Meta bug reporter | systemux://bug_report
| N/A |
System Deep Link Implementation
All system deep links are implemented as
Android ActivityManager commands. This built-in Android system allows developers to test system deep links interactively, by using
adb, with the following command:
adb shell am start -a android.intent.action.VIEW -n com.oculus.vrshell/.MainActivity -d "[INTENT]" -e "uri" "[URI]"
To perform a system deep link, your app should call the following code in a Java plugin built alongside your app:
PackageManager pm = context.getPackageManager();
Intent intent = pm.getLaunchIntentForPackage("com.oculus.vrshell");
intent.putExtra("intent_data", "[INTENT]");
intent.putExtra("uri", "[URI]");
context.startActivity(intent);
Note that you will need to get a reference to your application’s
Context. This can be done via
getApplicationContext(), or recorded at application start time.