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

2019-05-16 07:41:21 +08:00
 glouhao

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

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

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

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/564553

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX