如何添加到'添加到主屏幕'弹出的Android手机 [英] how to add to 'Add to homescreen' popup for android mobile

查看:96
本文介绍了如何添加到'添加到主屏幕'弹出的Android手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

没有人知道任何示例吗,我如何在Chrome中显示添加到主屏幕"的弹出消息. 在我的Web应用程序中,我想在用户第一次打开Web应用程序以保存快捷方式图标时显示弹出消息.使用html5和jquery. (这样我的Web应用程序下次即可作为本机应用程序运行.)

Does anyone know any example, how I can show popup message for 'Add to homescreen' in chrome. In my web app I wanna show popup message first time user open web app to save short cut icon. Using html5 and jquery. (so that my webapp will run as native app next time).

推荐答案

完成此操作,只要您的Web应用程序满足以下要求,就会提示用户将您的应用程序添加到主屏幕:

Since Chrome 42 there is now a standard way of accomplishing this that prompts the user to add your application to the home screen as long as your web application fulfills the following requirements:

  • 您有一个网络应用清单文件
    • 清单定义了您的应用在用户系统上的显示方式以及启动方式-您必须具有short_name144x144 png图标
    • 您的图标声明应包含image/png的哑剧类型
  • You have a web app manifest file
    • The manifest defines how your app appears on the user’s system and how it should be launched - and you are required to have a short_name and a 144x144 png icon
    • Your icon declarations should include a mime type of image/png

这篇关于如何添加到'添加到主屏幕'弹出的Android手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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