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
<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.