我成功实现了deep-links
,但现在我也想实现app-links
,但是我没有得到想要的结果。
AndroidManifest
<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="http"
android:host="*.ex.com"
android:pathPrefix="/vvv" />
<data android:scheme="https"
android:host="ex.com"
android:pathPrefix="/vvv" />
</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:scheme="http"
android:host="*.ex.com"
android:pathPrefix="/ttt" />
<data android:scheme="https"
android:host="ex.com"
android:pathPrefix="/ttt" />
</intent-filter>
当我访问我的网站链接ex.com/.well-known/assetlinks.json
时,确实看到了我的.json文件。我将粘贴的信息复制到其中:
https://developers.google.com/digital-asset-links/tools/generator
它显示:"Success! Host www.ex.com grants app deep linking to xxx."
但是,..应用程序链接仍然无法正常工作。
然后我尝试了https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://ex.com&relation=delegate_permission/common.handle_all_urls
响应是:
Error: unavailable: Redirect encountered while fetching statements from https://ex.com./.well-known/assetlinks.json (which is equivalent to 'https://ex.com/.well-known/assetlinks.json'): redirects are disallowed for security reasons (NOT_FOLLOWED_MAX_FORWARDS) [26] while fetching Web statements from https://ex.com./.well-known/assetlinks.json (which is equivalent to 'https://ex.com/.well-known/assetlinks.json') using download from the web (ID 1).\n********************* INFO MESSAGES *********************\n* Info: No statements were found that match your query\n",
问题出在哪里? 预先感谢。