Launching Unity App from URI

Hi,

This is something that has been asked a few times but never definitively answered:

How does one launch an app created in Unity from a URI in Unity?

ie. I have an app called My Awesome App

If I try to open http://myAwesomeApp.com/?awesomeness=6001 in my browswer/email app/whatever, I would like My Awesome App to open (bonus points if you can tell me how to access the full URI in Unity.

What I know so far is that I need to put the following XML:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="http" android:host="myAwesomeApp.com" />
</intent-filter>

… somewhere in my AndroidManifest.xml.

I’ve tried putting it in like this:

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name">
    <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" />
        <data android:scheme="http" android:host="www.myAwesomeApp.com" />
    </intent-filter>
  
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
  
</activity>

But that didn’t work :frowning:

<activity android:name=".activities.AppsUrlHandlerActivity">
  
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="http" android:host="www.myAwesomeApp.com" />
    </intent-filter>
  
</activity>

Neither did that.

Any help would be greatly appreciated.

I found it!

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
  
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
  
    <intent-filter>
  
        <data android:scheme="http" android:host="www.myAwesomeApp.com" />
  
        <action android:name="android.intent.action.VIEW" />
  
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
  
</activity>

Hi, Does anyone know how to do this for iOS? @Wahooney

I’m afraid I don’t, try looking up Deep Linking.

Sorry for bumping this up after ages ,i just can not seem to make it work added the android scheme as “mytestapp” and android:host=“open” ,is there any other steps that i am missing ??