Meta标签"苹果移动网络应用能力"为Android?苹果、能力、标签、网络

2023-09-05 06:08:00 作者:整天想死的鱼

有没有一种方法来创建像在iPhone上?

Is there a way to create an Android Web Application like on the iPhone?

在HTML页面的head元素使用苹果移动网络应用能力的元标记,它通知苹果iOS应用程序可以被安装到用户的跳板,使其开始在Safari手机浏览器没有菜单栏。

Using the "apple-mobile-web-app-capable" meta tag in the head element of an HTML page, it informs the Apple iOS that the application can be installed to the users springboard so that it starts the Safari Mobile browser without a menu bar.

推荐答案

Chrome浏览器在Android上新增了元标记的 移动网络应用能力

Chrome on Android now supports a meta-tag mobile-web-app-capable:

由于Chrome浏览器M31,你可以设置你的web应用程序有一个应用程序   快捷方式图标添加到设备的主屏幕,并有应用程序启动   在全屏幕应用模式使用Chrome浏览器Android版的加入   主屏幕菜单项。

Since Chrome M31, you can set up your web app to have an application shortcut icon added to a device's homescreen, and have the app launch in full-screen "app mode" using Chrome for Android’s "Add to homescreen" menu item.

有关详细信息移动网络应用能力 meta标记,向​​下滚动到支持之前,M39的主屏幕,安装的应用程序:

For details about the mobile-web-app-capable meta-tag, scroll down to "Supporting homescreen-installed apps prior to M39":

由于M31,Chrome将查找在下面的meta标签   该网页的元素(如果有带显示指定的一个清单,   这个被忽略):

Since M31, Chrome will look for the following meta tag in the element of the web-page (if there's a manifest with display specified, this is ignored):

< META NAME =移动网络应用能力的内容=是>

name属性   必须是移动网络应用能力和内容属性必须是   是(案例大小写)。如果在内容的任何其它值   属性的Web应用程序将被添加作为一个普通的书签。

The name attribute MUST be "mobile-web-app-capable" and the content attribute must be "yes" (case in-sensitive). If there is any other value in the content attribute the web app will be added as a regular bookmark.

虽然我没有运行Chrome浏览器M31,我可以用测试的所有设备,我跨preT这意味着全屏的Web应用程序,对设备的主屏幕的图标,支持早Chrome浏览器M31,只要你使用了移动网络应用能力 meta标签。

While I don't have any devices running Chrome M31 that I could test with, I interpret this to mean that full-screen web apps, with an icon on the device's homescreen, are supported as far back as Chrome M31, provided you use that mobile-web-app-capable meta tag.