如何获取添加到主屏幕在网站上弹出在移动浏览器中打开 [英] How to get Add to Home Screen Pop up on Site Open in mobile browser

查看:102
本文介绍了如何获取添加到主屏幕在网站上弹出在移动浏览器中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在移动浏览器中获得这个弹出窗口
添加到家里将在移动设备的主屏幕上创建一个带有移动网站链接的chrome图标。

建议解决方案。

解决方案

官方要求是:

lockquote

当您的应用满足以下条件时,Chrome会自动显示横幅广告:


$ b


  • How to get this pop up in mobile browser "Add to home" will create icon of chrome on home screen of mobile with site link on mobile.

    Please suggest the solution.

    解决方案

    Official requirements are:

    Chrome automatically displays the banner when your app meets the following criteria:

    • Has a web app manifest file with:
      • a short_name (used on the home screen)
      • a name (used in the banner)
      • a 144x144 png icon (the icon declarations must include a mime type of image/png)
      • a start_url that loads
    • Has a service worker registered on your site.
    • Is served over HTTPS (a requirement for using service worker).
    • Is visited at least twice, with at least five minutes between visits.

    source: https://developers.google.com/web/fundamentals/engage-and-retain/app-install-banners/

    You can skip these requirements for testing or debugging purposes by enabling a chrome flag:

    chrome://flags/#bypass-app-banner-engagement-checks

    这篇关于如何获取添加到主屏幕在网站上弹出在移动浏览器中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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