如何进行延迟深度链接? [英] How to make deferred deep linking?

查看:1219
本文介绍了如何进行延迟深度链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何进行延迟深度链接并生成唯一的移动签名。我尝试使用IP地址,屏幕大小,操作系统版本,设备名称,但仍然没有成功。

How to make deferred deep linking and generate unique mobile signature. I try using IP Address, screen-size, OS version, device name but still not get succeed.

推荐答案

评论链接到一个很好的答案,当然。高级别,以下是步骤:

The comment links to a great answer, certainly. High level, here are the steps:


  1. 您的链接应指向您网站上收集数字指纹的页面<​​/ li>
  2. 该页面应至少收集IP地址,操作系统,操作系统版本和屏幕尺寸(宽度和高度)。应该发送到您的服务器并放置在持久性存储中。 Redis因其快速的查找时间而非常适合这一点。还记录点击链接的某种唯一标识符(可能是redis中的值)。

  3. 然后重定向到应用程序(URI方案)并回退到App Store / Play商店。这是iOS的一个例子。 iframe的优点在于,如果未安装应用程序,它会终止alertView。这应放在正文中:

  1. Your links should point to a page on your site that collects a digital fingerprint
  2. That page should collect, at minimum, IP address, OS, OS version and screen size (width and height). Should send to your server and place in a persistent store. Redis works great for this because of its fast lookup times. Also record some sort of unique identifier for which link was clicked (that could be the value in redis).
  3. Then redirect to the app (URI scheme) and have a fallback to the App Store/Play Store. Here's an example for iOS. The beauty of the iframe is that it kills the alertView if the app is not installed. This should be placed in the body:

    <script type="text/javascript">
        window.onload = function() {
            // Deep link to your app goes here
            document.getElementById("l").src = "my_app://";

            setTimeout(function() {
                // Link to the App Store should go here -- only fires if deep link fails                
                window.location = "https://itunes.apple.com/us/app/my.app/id123456789?ls=1&mt=8";
            }, 500);
        };
    </script>
    <iframe id="l" width="1" height="1" style="visibility:hidden"></iframe>


  • 当用户打开您的应用时,向您的服务器发送相同的参数组合搜索您的持久性商店以查看此设备最近是否点击了链接。向您的应用发送回复(例如 {link_id:1234} {link_id:-1} )然后,您的应用逻辑应根据点击的链接做出响应。

  • When a user opens your app, send up the same combination of params to your servers and search your persistent store to see if this device recently clicked on a link. Send a response down to your app (e.g. { link_id: "1234" } or { link_id: -1 }) Your app logic should then respond based on which link was clicked.

    希望这是有道理的。我们在分支机构这样做,可以向您保证,它比从头开始推出此解决方案更难。各个浏览器甚至个别应用程序都引入了大量边缘案例(例如,当链接被分享到Twitter并在原生Android应用程序中点击时)。但在它的核心指纹识别相对简单。希望以上内容很有帮助。

    Hopefully this makes sense. We do this at Branch and can assure you that it's harder than it looks to roll this solution from scratch. There are a ton of edge cases introduced by individual browsers and even individual apps (e.g. when links are shared to Twitter and clicked on in the native Android app). But at it's core fingerprinting is relatively simple. Hopefully the above was helpful.

    这篇关于如何进行延迟深度链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆