我的应用程序定义了意图过滤器来处理来自我的网站定义的URL
<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:host="www.host.com" android:scheme="http"/>
</intent-filter>
<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:host="www.host.com" android:scheme="https"/>
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
该应用程序正确检测正确主机的URL,但查询用户是否在应用程序或浏览器中打开它们.我尝试使用此处指定的应用链接验证.https://developer.android.com/training/app-links/index.html
如我的服务器日志中所示,安装后,应用程序设备会查询/well-known/assetlinks.json,并以200状态响应.使用.测试数字资产文件
https:// digitalassetlinks.googleapis.com/v1/statements:list?source.web.site= https:// <domain1>:<port>&relation = delegate_permission/common.handle_all_urls
API并没有发现任何错误.
使用了获得assetlinks.json文件中的SHA256
keytool -list -v -keystore my-release-key.keystore
Run Code Online (Sandbox Code Playgroud)
应用程序签名的.keystore.
运行https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://<domain1>:<port>&relation=delegate_permission/common.handle_all_urls返回链接验证状态为"ask",表示验证失败.为什么验证会失败?