admin管理员组文章数量:1356457
I am developing a mobile web app. Currently I have this snippet of jQuery code which checks if the app is running full screen:
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>' );
}
I have a few questions:
- Does
window.navigator.standalone
work on Android phones? - What is the process for a user to add a mobile web app to their home screen? I tried looking for browser screenshots but didn't find any reliable sources.
Is there an equivalent to iPhone's "apple-touch-icon" link element?Found the answer to this here.
I am developing a mobile web app. Currently I have this snippet of jQuery code which checks if the app is running full screen:
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>' );
}
I have a few questions:
- Does
window.navigator.standalone
work on Android phones? - What is the process for a user to add a mobile web app to their home screen? I tried looking for browser screenshots but didn't find any reliable sources.
Is there an equivalent to iPhone's "apple-touch-icon" link element?Found the answer to this here.
2 Answers
Reset to default 4A web application can't run directly on android home screen. for that it need some other customized home screen. right now there are two panies who are working to provide a platform from android to run web application standalone.
- Obigo WRT
- Opera
where you can make your web application as a widget and then it will run in that runtime. currently obigo have provided the customized home screen. where opera will run web widget within an application.
window.navigator.standalone
is not supported on Chrome or Android browser.
It appears that a user now can manually add to home screen similar to iOS, but only in Chrome browser, not Android native browser. So this will only work for newer Android phones.
However, at this time there is no way to detect if it is running in standalone.
See Chrome reference: https://developers.google./chrome/mobile/docs/installtohomescreen
本文标签: javascriptAndroid equivalent of the iPhone39s quotAdd to Home ScreenquotStack Overflow
版权声明:本文标题:javascript - Android equivalent of the iPhone's "Add to Home Screen"? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744057428a2583507.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论