V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
glouhao
V2EX  ›  问与答

手机版 chrome 为啥不能打开很多应用呢

  •  
  •   glouhao · 2019-05-16 07:41:21 +08:00 via Android · 3461 次点击
    这是一个创建于 1779 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如贴吧,点 app,内打开就开始下载了,不管你有没有。

    24 条回复    2019-05-16 18:42:44 +08:00
    Ley
        1
    Ley  
       2019-05-16 07:43:00 +08:00 via Android
    这是手机贴吧的网页版自己加的限制啊…
    大部分国外的程序就不会强制要求下载应用
    acehow
        2
    acehow  
       2019-05-16 07:47:59 +08:00 via Android
    国内都这德行,根据 ua 逼你下 APP。其实大多数功能都不需要 APP,就是想拿 APP 来获得你个人信息。
    geelaw
        3
    geelaw  
       2019-05-16 07:50:29 +08:00 via iPhone
    @Ley #1
    @acehow #2

    你们谈论的是一个完全不同的问题,楼主想问为什么手机上已经有了 app 但是网站以为没有这个 app。
    wdv2ly
        4
    wdv2ly  
       2019-05-16 07:50:35 +08:00 via Android   ❤️ 2
    你们没有 get 到楼主的问题。我来解答下,因为 chrome 不支持 urlscheme 跳转,而很多 app 是通过这种方式判断唤起的,唤起失败就认为没安装,走下载逻辑
    Ley
        5
    Ley  
       2019-05-16 08:11:58 +08:00 via Android
    @geelaw 哦哦,我理解错了,审题不严…
    glouhao
        6
    glouhao  
    OP
       2019-05-16 08:41:07 +08:00 via Android
    @acehow @geelaw @wdv2ly 谢谢大家 ,知道为啥了,大家用什么浏览器呢?
    GPLer
        7
    GPLer  
       2019-05-16 08:46:33 +08:00 via Android
    @glouhao Yuzu
    ysc3839
        8
    ysc3839  
       2019-05-16 08:47:19 +08:00 via Android
    @wdv2ly 但是我的手机上 Chrome 可以打开淘宝 知乎,不应该不支持吧?
    smilingsun
        9
    smilingsun  
       2019-05-16 08:50:26 +08:00
    已知,我点击 Google 搜索结果可以打开知乎,下厨房
    Lin0936
        10
    Lin0936  
       2019-05-16 08:51:51 +08:00
    不是 chrome 打不开,是厂商没适配
    morethansean
        11
    morethansean  
       2019-05-16 09:06:38 +08:00
    @wdv2ly #4 ???那你以为怎么实现唤起 app 的?
    Parabolazz
        12
    Parabolazz  
       2019-05-16 09:08:19 +08:00 via iPhone
    66beta
        13
    66beta  
       2019-05-16 09:12:13 +08:00 via Android
    chrome 安全机制的问题,国产浏览器一般都能唤起
    whwq2012
        14
    whwq2012  
       2019-05-16 09:17:05 +08:00 via Android
    https://imgchr.com/i/EHpN5V
    小米能设置哪些域名能唤醒哪些应用,所以我感觉还和系统有关。
    wdv2ly
        15
    wdv2ly  
       2019-05-16 11:56:04 +08:00
    @morethansean chrome 能唤起的 app 是用了非 urlscheme 的方式唤起的,然而多数 app 没有适配这种方式。
    wdv2ly
        16
    wdv2ly  
       2019-05-16 12:00:41 +08:00
    @ysc3839 应该是这些 app 适配了 chrome 规定的唤起手段。
    learnshare
        17
    learnshare  
       2019-05-16 12:02:55 +08:00
    不是 Chrome 的问题,是系统的问题
    正常的系统都会根据 urlscheme 提示用户选择打开方式吧
    morethansean
        18
    morethansean  
       2019-05-16 12:09:37 +08:00
    @wdv2ly #16
    nope, 我自己开发的我还不知道,就是 schema 唤起的。
    wdv2ly
        19
    wdv2ly  
       2019-05-16 12:16:20 +08:00
    @morethansean 请问你开发的什么 app ?

    以下摘自[chrome 开发文档]( https://developer.chrome.com/multidevice/android/intents),明确说了 chrom25+以后不支持 url scheme

    > A little known feature in Android lets you launch apps directly from a web page via an Android Intent. One scenario is launching an app when the user lands on a page, which you can achieve by embedding an iframe in the page with a custom URI-scheme set as the src, as follows: <iframe src="paulsawesomeapp://page1"> </iframe>. This works in the Chrome for Android browser, version 18 and earlier. It also works in the Android browser, of course.

    > The functionality has changed slightly in Chrome for Android, versions 25 and later. It is no longer possible to launch an Android app by setting an iframe's src attribute. For example, navigating an iframe to a URI with a custom scheme such as paulsawesomeapp:// will not work even if the user has the appropriate app installed. Instead, you should implement a user gesture to launch the app via a custom scheme, or use the “ intent:” syntax described in this article.
    winterbells
        20
    winterbells  
       2019-05-16 12:32:53 +08:00 via Android
    @wdv2ly 云开发?
    我们这样做好久了。实在不行自己找个 demo 试试不就知道了
    ShinnAsuka
        21
    ShinnAsuka  
       2019-05-16 12:38:01 +08:00
    我的手机版谷歌浏览器还会自动跳转贴吧呢 我还不想让他跳转 是不是你的版本问题啊
    morethansean
        22
    morethansean  
       2019-05-16 12:56:07 +08:00   ❤️ 1
    @wdv2ly #19
    甩文档自己不看全?
    “ The functionality has changed slightly in Chrome for Android, versions 25 and later. It is no longer possible to launch an Android app by setting an iframe's src attribute ”
    只是不再支持用 iframe 的 src 来唤起了而已,你真的是云开发。
    glouhao
        23
    glouhao  
    OP
       2019-05-16 12:59:15 +08:00 via Android
    @learnshare @smilingsun 知乎 开源 nga 可以,nga 好像有时候不可以。或许是华为系统得事。用了火狐没事了。
    wdv2ly
        24
    wdv2ly  
       2019-05-16 18:42:44 +08:00
    @winterbells
    @morethansean
    行吧,懒得多说,就当我云开发好了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5678 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:30 · PVG 14:30 · LAX 23:30 · JFK 02:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.