小编vep*_*epe的帖子

为移动应用程序创建深层链接

我想为我的应用创建促销链接 - 我可以通过电子邮件分发.当用户点击电子邮件中的链接时,网页会执行以下操作:

  1. 确定哪个操作系统(iOS或Android)
  2. 如果app安装在设备上 - 打开应用程序
  3. 否则 - 将用户带到AppStore(或)PlayStore(或)自定义URL.

我尝试使用AppLinks(applinks.org) - 但我无法让它工作.浏览器如何理解"al:xx:xxx .."标签?它只适用于facebook/twitter吗?

<html>
    <head>
       <meta property="al:ios:url" content="applinks://docs" />
       <meta property="al:ios:app_store_id" content="12345" />
       <meta property="al:ios:app_name" content="App Links" />
       <meta property="al:android:url" content="applinks://docs" />
       <meta property="al:android:app_name" content="App Links" />
       <meta property="al:android:package" content="org.applinks" />
       <meta property="al:web:url" content="http://applinks.org/documentation" />
   </head>
Run Code Online (Sandbox Code Playgroud)

我还尝试了另一篇文章中的一些javascript - 但如果未安装该应用程序,浏览器会显示错误:

<script>
    window.onload = function() {
        window.location = 'http://www.launchMyApp';

        setTimeout("window.location = 'http://play.google.com/someApp';", 1000);
    }
</script>
Run Code Online (Sandbox Code Playgroud)

请帮忙.谢谢.

redirect android deep-linking ios applinks

9
推荐指数
2
解决办法
3416
查看次数

标签 统计

android ×1

applinks ×1

deep-linking ×1

ios ×1

redirect ×1