如何在 android webview 中处理 firebase 动态 link

how can handle firebase dynamic link in android webview

当我使用 firebase dynamic link 时,我在 android 浏览器 'Dynamic Link Not Found' 中遇到错误。我在 android 中没有应用程序,所以如果 link 打开它应该重定向到 android 网络视图。所以它重定向到 chrome,但显示上述错误。如何解决这个错误?

   this.http.post<any>('https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=*********', 
    {
      "longDynamicLink": "https://example.com/invit?link=https://example.com/invit/"+id+"/&ibi=-App-Run-XYZ&isi=123456&efr=1&afl=https://example.com/friends/"+id+"&ofl=https://example.com/friends/"+id
    }

当我更改 'your_deep_link' url 时它起作用了。

例如,如果您要为资源https://example.com/my-resource (a web page, Universal Link, or App Link), you can't use https://example.com/ as the Dynamic Links URL prefix, because doing so would cause https://example.com/my-resource 创建一个动态Link 以将其视为动态Link。相反,您必须使用带有不同域或不同路径前缀的 URL 前缀。

错误

https://example.com/?link=https://example.com/my-resource
https://example.com/?link=https://example.com/resources/my-resource

正确

 https://link.example.com/?link=https://example.com/my-resource
 https://example.com/links/?link=https://example.com/my-resource
 https://ex.amp.le/?link=https://example.com/my-resource