I have the following manifest code:
<activity
android:name=".InterceptorActivity"
android:launchMode="singleTask"
android:parentActivityName=".HomeActivity"
tools:ignore="UnusedAttribute"
android:theme="@style/Theme.Startup"
android:exported="true">
<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"/>
<data android:scheme="http"/>
<data android:host="www.mysite.com"/>
<data android:pathPrefix="/myPage"/>
<data android:pathPrefix="/myFavourites"/>
</intent-filter>
</activity>
assetlinks.json looks ok and uploaded correctly. But all applinks still opening only in browser, and I see, that app support the link, but it's unchecked.
Also command "adb shell pm get-app-links "com.myapp.android" returns
com.myapp.android:
ID: 893......
Signatures: [13:03....DA]
Domain verification state:
www.myapp.com: legacy_failure
Why? Please help.
The reason was in incorrect file syntax. The correct is:
[
{
"relation": [
"delegate_permission/common.get_login_creds"
],
"target": {
"namespace": "web",
"site": "{siteurl}"
}
},
{
"relation": [
"delegate_permission/common.get_login_creds"
],
"target": {
"namespace": "android_app",
"package_name": "com.my.app.android",
"sha256_cert_fingerprints": [
"B4:...:9M"
]
}
},
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.my.app.android",
"sha256_cert_fingerprints": [
"B4...9M"
]
}
},
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.my.app.android.dev",
"sha256_cert_fingerprints": [
"BK...9Q"
]
}
}
]