我有以下清单代码:
<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看起来很好,上传的也是正确的。但是所有的应用程序仍然只在浏览器中打开,我知道,这个应用程序支持链接,但它是不受检查的。
还命令"adb shell pm get-app链接“"com.myapp.android”返回。
com.myapp.android:
ID: 893......
Signatures: [13:03....DA]
Domain verification state:
www.myapp.com: legacy_failure为什么?请帮帮忙。
发布于 2021-12-16 15:00:20
原因是文件语法不正确。正确的是:
[
{
"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"
]
}
}
]发布于 2021-12-08 14:54:05
我确信您已经访问了以下链接:https://developer.android.com/studio/write/app-link-indexing
只是稍微改进一下清单,以清除代码。
<intent-filter android:autoVerify="true" tools:node="merge">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="${hostName}" android:pathPrefix="/auth/login" android:scheme="https"/>检查assetlinks.json文件https://DOMAIN.well-known/assetlinks.json
我面临着苹果M1芯片的问题,这是一个基于英特尔的机器上的链接,我的理论是Android没有在M1机器上验证Apple
https://stackoverflow.com/questions/70276524
复制相似问题