Deep links are URL links outside of your application that direct users to a location in your application. When the user clicks a deep link for an application, the operating system opens the Unity application at a specified place (for example, a specific scene). For more information about deep links and how to use them, see Deep links.
Before you can process deep links, you need to configure your application to react to them. This section contains instructions on how set up deep links for Android.
To enable deep linking for Android applications, use an intent filter. An intent filter overrides the standard Android Manifest to include a specific intent filter section for Activity. To set up an intent filter:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="unitydl" android:host="mylink" />
</intent-filter>
</activity>
</application>
</manifest>
Your Android application now opens when the device processes any link that starts with unitydl://
.
After you enable deep links for Android, the way that you use them is platform-agnostic. For information on how to handle deep links when your application opens, see Using deep links.