【问题标题】:Using Branch.io link is not opened in Android使用 Branch.io 链接未在 Android 中打开
【发布时间】:2016-09-15 20:56:50
【问题描述】:

我是 branch.io 的新手,但它让我发疯。

我刚刚在 branch.io 仪表板中设置了我的链接,如下所示:

Android URI scheme: http://www.foo.com/bar://

还有回退到谷歌游戏商店。

As well as the default URL http://www.foo.com

在我的 Android 清单中,我输入了这个

<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_xxxxxxxxxxxxxxxxx" />

这是我的主要活动

<intent-filter>
            <data android:scheme="http://www.foo.com/bar" android:host="open" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

该链接仍未在 Android 和 Google Play 中打开。

奇怪的是,这个链接:https://foo.app.link/xxxxxx 在 Google play 中的正确应用页面上打开,但与我的 branch.io 设置中的内容没有任何共同之处。

对为什么 URI 方案背后有两种不同的逻辑感到困惑。 感谢您的帮助!

【问题讨论】:

    标签: android branch.io


    【解决方案1】:

    来自 Branch here 的 Alex:您在 scheme 字段中输入的内容过多 :)。 Branch仪表板应该有一个类似于foo://的URI方案,Android清单应该有&lt;data android:scheme="foo" android:host="open" /&gt;

    【讨论】:

    • 感谢亚历克斯的提示。我将方案减少到只有两端的“foo”,现在 foo.app.link/xxxxxx 可以工作了。您能否具体说明为什么会在应用程序中打开但 www.foo.com 却没有?我可以使用 foo.app.link/xxxxxx 但 /xxxxxx 部分是我不应该分享的秘密吗?
    • 我认为您可能对 URI 方案的定义感到困惑。 www.foo.com 的方案实际上是httphttps,只是按照惯例省略了,因为http 链接非常常见,所以这两个东西不能直接互换。 URL 的/xxxxxx 部分根本不是秘密——您应该与Branch 分享该部分
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多