I've been implementing google app indexing in my app, though it's turning out to be very hard for me to understand. I've created the following intent-filter in my app
<intent-filter android:label="@string/app_name">
<data android:scheme="android-app"
android:host="com.towers.mywebsite" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="www.mywebsite.com" />
<data android:scheme="https"
android:host="www.mywebsite.com" />
</intent-filter>
I'd like to grab all the links like www.mywebsite.com?parameter=123 but NOT links like www.mywebsite.com/somethingelse
With the intent-filter above, my app is in the list of possible apps to open all the deep links like www.mywebsite.com...
My question is: am I doing it right? How am I supposed to filter the intent in order not to make all the links try and open tre app? I thought google would have chosen open-the-app-or-the-browser by checking which pages of my website do have the link rel attribute, but it seems like it only relies on my app intent-filter. Therefore, I need to tweak them in order to filter only the pages I want. How can I do that?
Thank you
You can rely on markups if you don't declare App-Website association. https://developers.google.com/app-indexing/android/app#declare-a-website-association
You can also try controlling indexing by creating noindex.xml file to specify the URLs you want excluded from the Google index. https://developers.google.com/app-indexing/android/app#noIndex
Cheers,
MB