【发布时间】:2017-04-17 14:32:02
【问题描述】:
我们有一个移动网站,我们正在尝试使用我们的移动页面使用 branch.io 进行深度视图。
我们按照以下链接中提到的步骤操作:https://dev.branch.io/features/website-to-app-routing/guide/
我们创建了一个只有 1 个参数的新 url,即 $fallback_url = www.xxx.com/a/b 并在我们的 angular js 移动网站中嵌入了以下 js 代码。我们的 android URI 架构是 abc://a?x=y
我们在 head 标签中添加了 branch.io web sdk,并在 script 标签中添加了以下脚本。
// load the Branch SDK file
branch.init('Test_key', function(data) {});
// define the deepview structure
branch.deepview({
'channel': 'mobile_web',
'feature': 'deepview',
data: {
'$deeplink_path': 'a?x=y'
}
}, {
'open_app': true // If true, Branch attempts to open your app immediately when the page loads. If false, users will need to press a button. Defaults to true
}, function() {
branch.deepviewCta();
console.log('callback');
});
现在的问题是移动网站已正确加载,但是当它在网页加载后尝试打开移动应用程序时,它会尝试使用 url 作为“intent://open?branch_link=zzzz”而不是架构的重定向在 deeplink_url 变量中提到。
请帮忙。
【问题讨论】:
标签: javascript android angularjs deep-linking branch.io