In my Manifest file I've made sure that whenever a link to my website is clicked and an Intent is created with ACTION_VIEW
, my app will be among the suggestions to the user as to what the link should be opened with. They can usually choose between Chrome and my app.
Now, how do I add a URL that I do NOT want my app to open, I only want chrome to open it right away (without asking the user to choose between chrome and my app)
For instance, I want to preserve the code below, but modify it as to exclude "mywebsite.com/promotion" from being openable by my app
<activity
android:name=".MainActivity">
<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="mywebsite.com"
android:scheme="http" />
<data
android:host="mywebsite.com"
android:scheme="https" />
</intent-filter>
</activity>
EDIT It has been suggested that the answer here might help: Exclude few Urls from deeplinking
but it doesn't because it is for a very particular case, which doesn't apply in my situation