gpt4 book ai didi

Android 深度链接无法捕获重定向 url

转载 作者:行者123 更新时间:2023-12-04 23:48:03 26 4
gpt4 key购买 nike

那可能的深层链接是这样的吗
我有像 http://example.com/shortlink 这样的链接
当它打开到浏览器时,它会重定向到http://example.com/product?id=123
所以然后在那里我将打开我的应用程序并直接转到 id 为 123 的产品

我有这样的 Intent 过滤器

[IntentFilter(new[] { Intent.ActionView },

Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable },

DataSchemes = new[] { "http", "https" },

DataHost = "example.com",

DataPathPrefixes = new[] { "/cat", "/test", "/product" },

DataPath = "/")]



现在重定向后的网址将直接打开播放商店,所以我无法在我的 Intent 过滤器上捕获它
还有当我尝试直接复制粘贴 http://example.com/product?id=123浏览器也直接去play store。可以通过 Intent 过滤器过滤吗?如果我从另一个应用程序(例如聊天应用程序)打开链接,它应该可以正常工作(显示我的应用程序的对话框弹出窗口)

最佳答案

在以下情况下,Chrome 不会为给定的 Intent URI 启动外部应用程序。

  • 当 Intent URI 从键入的 URL 重定向时。
  • 当 Intent URI 在没有用户手势的情况下启动时

  • 查看更多: https://developer.chrome.com/multidevice/android/intents

    关于Android 深度链接无法捕获重定向 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48379021/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com