'Deep Links and Instant Apps
I am attempting to implement deep links within my Instant App, and keep running into issues that seem to be coming from something to do with the base application. Currently, the error I'm receiving from the Play Console states:
You should have at least one active installed app APK that mapped to site 'example.site.com' through a web intent-filter.
I do have an intent-filters set up in both the instant app and in the full base app. The intent-filters in the base application look like this:
<intent-filter>
<data
android:scheme="http"
android:host="example.site.com"
android:pathPattern="/test/app/" />
</intent-filter>
<intent-filter>
<data
android:scheme="https"
android:host="example.site.com"
android:pathPattern="/test/app/" />
</intent-filter>
And the intent-filters in the instant app module's manifest look like this:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="example.site.com"
android:pathPattern="/test/app/" />
<data
android:scheme="http"
android:host="example.site.com"
android:pathPattern="/test/app/" />
</intent-filter>
With the instant app manifest also containing a default url, set up within the activity tag.
I'm not sure what I am missing here. I have set up the intent filters as I've seen elsewhere on the web, in Google's documentation, and in other forum posts where I've seen people encountering issues with this process. I've also hosted the assetlinks.json file in the .well-known directory on my domain, and verified that it is correct and accessible using Google's verification API. Does anyone know what the issue causing this error may be? Thanks!
Solution 1:[1]
From what I have read in the documentation you need to make sure that you use an intent-filter with autoVerify, action and categories for the app as well. In your example you can simply copy & paste the intent-filter that you are using in the instant-app to your full app.
In case you are using string resources for scheme, host or pathPattern I would try to avoid this and directly enter your values in the manifest instead.
e.g. (crafted from your post)
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="example.site.com"
android:pathPattern="/test/app/" />
<data
android:scheme="http"
android:host="example.site.com"
android:pathPattern="/test/app/" />
</intent-filter>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | mrequalizer |