从install-referrer意图获取深度链接数据



我想要这个流用于我的应用程序
当用户点击我的网站上包含深度链接元素的链接时,例如:www.example.com/lorem?a=qwerty&b=poiuyt,可能会发生以下两件事:

  1. 如果应用程序存在,则用户将被带到各自的活动中,并显示内容(这是我通过使用以下内容完成的)

    <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:host="www.example.com" />

  2. 如果应用程序不在设备中,则必须将用户带到应用程序商店,如果用户下载并运行应用程序,则应打开此内容页面。(这我不能做)

arrow001,

与安卓系统的深度链接可能很棘手。使用Branch的开源Android SDK很容易解决您无法深度链接到未安装应用程序的人的问题(即,如果没有应用程序->转到应用商店->通过安装传递数据->加载深度链接内容)。它将允许您通过安装传递数据,您生成的链接将跨平台(桌面/android/ios)工作。

这里有几个链接可以让你开始:

了解Branch的工作(即如何解决您的问题):https://dev.branch.io/#what-分支机构做吗

将SDK添加到项目中:https://dev.branch.io/recipes/add_the_sdk/android

建立深度链接&生成深层链接:https://dev.branch.io/recipes/setup_deep_linking/android

SDK来源:https://github.com/BranchMetrics/Android-Deferred-Deep-Linking-SDK

示例应用程序:https://github.com/BranchMetrics/Branch-Example-Deep-Linking-Branchster-Android

最新更新