I defined an intent filter to launch an application from several types of URLs. The fact is that it runs for all types of links, and I only want to run it for a specific hostname. Here is my manifest:
<activity
android:name="com.imin.SplashActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:logo="@drawable/img_action_icon"
android:screenOrientation="portrait"
android:theme="@style/AppTeme.Fullscreen" >
<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:host="imintheapp.com"
android:pathPrefix="/events/get/"
android:scheme="http" />
</intent-filter>
</activity>
I only need to open my application in the following cases: http://imintheapp.com/events/get/xxxxxxxx , where xxxxxxxx is an alphanumeric string.
What am I doing wrong? Yours faithfully,
source
share