有办法知道让Android chrome以full screen mode运行web app的intent吗?
天蓬老师
天蓬老师 2017-04-17 11:27:11
0
1
521

现在的chrome for android也能像safari那样以全屏模式运行web app了。
长久以来很多人不把web app当app的原因是那些address bar,controls,但现在这个问题有多元化的解决方案。不同于HTML5的document.element.requestFullScreen(),android上的chrome和ios上的Safari提供一种被称作installed web app的方式来实现全屏运行web app,并且在浏览器层提供优化。

如果你也尝试过这样运行你的web app,你就会明白现在web app与native app的体验差距有多小了。

我的问题是,如何让chrome以为我添加在主屏幕的快捷方式也是一个installed web app?换言之,我有可能知道那个调用chrome启用web app mode的intent吗?


参考资料:
https://developers.google.com/chrome/mobile/docs/intents
https://developers.google.com/chrome/mobile/docs/installtohomescreen
http://www.html5rocks.com/en/mobile/fullscreen/
http://stackoverflow.com/questions/14477928/how-to-open-a-website-using-safari-in-fullscreen-mode-for-ipad

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
洪涛

Seeing that some friends have collected this question, I think it is necessary for me to post my recent progress here (again) (it seems that I often ask and answer myself, haha).

Things done so far:

  1. I found an app called intent intercept on google play. This app can capture and display intent. But the way it works is that the user needs to select this intent intercept in "Select Open Program" before it can be displayed. In other words, it cannot be used to capture intents that do not have the process of "selecting to open the program".

  2. There is no such step when launching the installed web app on the mobile desktop. After I uninstalled Chrome and opened the installed web app on the desktop, a toast was displayed: "The corresponding application is not installed." After reinstalling chrome, something interesting happened. The installed web app opened, but it was opened directly with the chrome browser, without full-screen display and no new background.

Conclusion:

This intent should be similar to the ordinary browser intent for opening a link, except that the parameters cannot be known.
In addition, this intent is directly targeted at Chrome. If not all users (or most) have Chrome installed, there is no practical significance in exploring the technical details. That’s it for me. If there are other experts who want to continue to explore, you can answer directly haha. I will definitely change it~

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!