2

我开发了一个 android 应用程序,我正在使用深层链接打开该应用程序,它在除三星手机之外的所有其他设备上都能完美运行,当我尝试通过三星默认 Messenger 打开它时,它也是如此,而不是启动它正在将我重定向到 Google Play 商店的应用程序。请给我解决方案以找出我错过了什么。

<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:exported="true"
                android:host="frr.com"
                android:scheme="https" />
            <data
                android:exported="true"
                android:host="frr.com"
                android:scheme="http" />
            <data
                android:exported="true"
                android:host="www.frr.com"
                android:scheme="https" />
            <data
                android:exported="true"
                android:host="www.frr.com"
                android:scheme="http" />
        </intent-filter>

这是链接 - https://frr.com/open.php

4

1 回答 1

2

有两种方法可以深度链接到 Android 上的应用程序:应用程序链接和 URI 方案。您提供的配置是针对 App Links 的,Android 上的许多应用程序仍然不支持。为了链接这些应用程序,您必须使用 URI 方案。为了确保获得最广泛的支持,您应该将您的应用配置为同时使用应用链接和 URI 方案。

这是一个示例意图过滤器,用于通过 URI 方案链接到具有 URI 方案“branchtest”的应用程序:

        <intent-filter>
            <data android:scheme="branchtest"/>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>

我从支持 App Links 和 URI Schemes 的 Branch 演示应用程序中获取了这个示例,这里是:https://github.com/BranchMetrics/android-branch-deep-linking/blob/master/Branch-SDK-TestBed/AndroidManifest。 xml

于 2017-02-12T16:11:30.800 回答