从安装引荐对象

时间:2015-12-29 11:28:06

标签: android intentfilter deep-linking

我想为我的应用程序提供此流程。
当用户点击包含深层链接元素的网站链接时,例如:www.example.com/lorem?a=qwerty&b=poiuyt可能会发生以下两种情况:

  1. 如果app存在,那么用户将被带到相应的活动并显示内容(这是我通过使用以下内容完成的)

    <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. 如果设备中没有应用,则必须将用户带到应用商店,如果用户下载并运行应用,则应打开此内容页面。 (我不能这样做)

1 个答案:

答案 0 :(得分:0)

arrow001,

与Android的深层链接可能会非常棘手。您能够深入链接到未安装应用的用户的问题(即,如果没有应用 - >转到应用商店 - >通过安装传递数据 - >加载深层链接内容)很容易实现Branch的开源Android SDK。它将允许您通过安装传递数据,您生成的链接将跨平台(桌面/ android / ios)工作。

以下是一些可以帮助您入门的链接:

了解分支的作用(即它如何解决您的问题): https://dev.branch.io/#what-does-branch-do

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

设置深层链接&amp;生成深层链接: 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