我正在开发一款移动Web应用。目前,我有这段jQuery代码片段,用于检查应用程序是否在全屏模式下运行:
if ( !window.navigator.standalone )
{
$('#content').before( '<div class="notice">To enjoy the mobile experience to its fullest, tap the arrow button on the toolbar below, choose <b>Add to Home Screen</b>, then launch it from there.</div>' );
}
我有几个问题:
window.navigator.standalone
在Android手机上工作吗?- 用户如何将移动Web应用程序添加到主屏幕?我尝试查找浏览器截图,但没有找到可靠的来源。
是否有类似于iPhone的“apple-touch-icon”链接元素的等效物?在这里找到了答案:link。