I am developing a web cross-browser app.
I want that, clicking on "ADD HOME" icon, by Javascript detects the OS (Android, iOs, BB...) and creates a Shortcut (bookmark) on the HomeScreen.
Is it possible?
Thanks a lot.
At least on iOS(4.x) it isn't possible.
Read Javascript for "Add to Home Screen" on iPhone? for details. As it is suggested, you can add a bubble, dialog or some other information to guide the user for using iOS's own functionality.
Related
I have a question about how to make a website that supports Add to Homescreen in Google chrome.
That's mean some websites like web.whatsapp.com when clicking on the Add to home screen, Website shortcut add to my home screen but when I open it, it has different, It opens in fullscreen mode and hide Google chrome options.
please say how to create a website like that.
I think they are called PWA (Progressive Web App) you can find information online on how to create those apps from scratch.
I m trying to make my website social icon, refer to a link (when clicked) based on the platform being used on. like the following:
if The website is opened on ios phone, ipad... to launch a specific deep link.
if The website is opened on android phone ... to launch a specific deep link.
if The website is opened on desktop pc ... to launch a specific link.
Thank you!
You can use HTTP Header.
See: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
Through the User-Agent field you can get the browser version etc. Other header could be interesting for you, too.
I have a customer that wants to launch a certain website from an icon on a tablet that runs Android. He's leasing out the tablets, so we have complete control over the hardware. The idea is that these tablets will only be used for his site (it's a type of slide show), so he wants the tablet home screen to have a single icon, and that icon will always launch his site in complete fullscreen. This works somewhat, but the statusbar does not go away without a user gesture. On Chrome the meta tag mobile-web-app-capable does the trick, but we can also use other browsers if this simplifies things. Is it possible to remove the statusbar without a second user gesture (the first being launching the website)?
And in response to the answers below, how can a WebLauncherActivity be useful when the user is just opening a browser?
On the page, element.requestFullscreen() displays the element in fullscreen mode.
Additional JS API and CSS selectors can provide other fullscreen specification in the following html5 article:
Building an Amazing Fullscreen Mobile Experience
Try using the WebappLauncherActivity that's used by the page shortcuts.
You should be able to launch the activity via adb with:
adb shell am start -n com.android.chrome/.webapps.WebappManager.ACTION_START_WEBAPP "url"
You can also add your own activity inheriting from FullscreenActivity which is the base for WebappActivity like mentioned by #tushar-pandey.
In Iphone , the web icon function is something like when browsing the website, if I click on add to homescreen, then there will be a shortcut for the website on the homescreen, so the user later click on that icon will open the browser and go to the bookmarked website.
Are there any jquery plugin or something to implement this on android? Thanks
It should be some plugin like this, but for android
https://code.google.com/p/mobile-bookmark-bubble/
In reference to your post i got some links which i got from web as well as other discussions going in stack, here iam pasting the hope they may help you
JQuery Mobile Add the Home Screen Options?
How to add android bookmark on homescreen from web page?
http://cubiq.org/add-to-home-screen
http://blog.linuxacademy.com/mobile/create-an-add-to-home-screen-popup-html5-or-jquery-mobile/
"Add to homescreen" button in Android does not show website as a Web App
I am working on smartphone site. Is there a way to set "Bookmark this site" button on both Android and iPhone site like old school website?
No, there isn't, and I hope nobody implements this, it is too obstrusive.
What some sites do, at last on iPhone, is to create a popup pointing to the bookmark button (see youtube mobile) asking if the user wants to bookmark it.