元标记“apple-mobile-web-app-capable"安卓的? [英] Meta Tag "apple-mobile-web-app-capable" for Android?

查看:25
本文介绍了元标记“apple-mobile-web-app-capable"安卓的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法像在 iPhone 上一样创建一个 Android Web 应用程序?

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

在 HTML 页面的 head 元素中使用apple-mobile-web-app-capable"元标记,它通知 Apple iOS 应用程序可以安装到用户跳板,以便它启动 Safari Mobile 浏览器没有菜单栏.

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.

推荐答案

Android 上的 Chrome 现在支持元标记 支持移动网络应用:

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

自 Chrome M31 起,您可以设置您的网络应用程序以拥有一个应用程序添加到设备主屏幕的快捷方式图标,并启动应用程序在全屏应用模式"下使用 Chrome for 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.

有关 mobile-web-app-capable 元标记的详细信息,请向下滚动到在 M39 之前支持主屏幕安装的应用程序":

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

从 M31 开始,Chrome 会在网页的元素(如果有指定显示的清单,这被忽略):

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):

名称属性必须是mobile-web-app-capable"并且内容属性必须是是"(不区分大小写).如果内容中有任何其他价值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 的设备,但我认为这意味着在设备主屏幕上带有图标的全屏网络应用程序支持早在 Chrome M31 上提供您使用该 mobile-web-app-capable 元标记.

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.

这篇关于元标记“apple-mobile-web-app-capable"安卓的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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