【问题标题】:Browser can't open an app from a browser using deeplink浏览器无法使用深度链接从浏览器打开应用
【发布时间】:2019-09-24 15:56:18
【问题描述】:

我正在尝试在我的应用程序中实现深层链接,以便用户能够从浏览器中打开应用程序。因此,我在 Manifest.xml 中的应用程序中添加了深层链接。这段代码在 adb 中运行,但是当我试图在浏览器中打开这个链接时,应用程序没有打开。什么会导致此错误?我什至在我的代码中都看不到 Intent

<activity
    android:name=".ui.main.MainActivity"
    android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize"
    android:screenOrientation="portrait"
    android:windowSoftInputMode="adjustPan">

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

    <intent-filter>
        <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="example.com"
            android:pathPrefix="/"/>
    </intent-filter>
</activity>

【问题讨论】:

  • 你能分享它需要重定向到的确切链接吗?
  • 很遗憾,没有,但是您可以添加任何链接,此代码根本不起作用
  • 好吧,我想通了。我有两个 。只能工作一个

标签: android android-deep-link


【解决方案1】:

使用 Firebase 深层链接(Hope Help-full)

https://firebase.google.com/docs/dynamic-links

【讨论】:

    猜你喜欢
    • 2017-02-04
    • 2019-04-05
    • 2018-12-06
    • 2021-09-16
    • 2017-07-05
    • 2021-11-03
    • 1970-01-01
    • 1970-01-01
    • 2012-02-21
    相关资源
    最近更新 更多