How to add android bookmark on homescreen from web page? How to add android bookmark on homescreen from web page? android android

How to add android bookmark on homescreen from web page?


Some of the people answering here seem to not understand that you want something for mobile, not IE, Firefox, etc. They also don't seem to read very well where you said "website", not "mobile app". However, I believe I have read your question properly.

There's extremely high odds that you'll probably also want this for iPhone, so I'll answer this for iPhone and Android as well.

For iPhone, it's as simple as using this script:

http://code.google.com/p/mobile-bookmark-bubble/

For Android, it's not so pretty, unfortunately. You'll have to make a button or hyperlink that redirects to an instructions page on your site. The instructions will tell web visitors to do "Settings > More > Add Shortcut to Home" and hope they "get it".

One option for Android is that you can fork mobile-bookmark-bubble, make it load at the bottom of the page without the bottom triangle, and make it read, "Click the Settings button > More > Add Shortcut to Home". As well, you might want to put the 2 bars icon of what the Settings button looks like right next to "Settings button".

As for how to customize the icon that gets created, I'm still researching that and will update this answer when I find out.


Here is a possible workaround, and while it isn't exactly what you want, I think it is the easiest solution as I'm highly skeptical that android allows web pages to automatically issue intents to a device, as this would be a potential security problem. Someone please correct me if I'm wrong

I recommend that you create an app that is simply a wrapper around a bookmark. When the user clicks on your app, your app creates an intent that simply opens the device's default web browser to your page. While this will require the users install a app it has a few advantages over a plain bookmark. You will be able to track how many people have your app/bookmark installed, how often they use it etc. You can also provide a nice looking icon instead of using the stock "bookmark" icon.

Upload the app to the market as a free app and place a "bookmark this" link on your webpage that simply directs the user to download your free app.


You can create a web page shortcut on home screen using this code. Provide the necessary info like url, title etc..

  final Intent in = new Intent();  final Intent shortcutIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));  long urlHash = url.hashCode();  long uniqueId = (urlHash << 32) | shortcutIntent.hashCode();  shortcutIntent.putExtra(Browser.EXTRA_APPLICATION_ID, Long.toString(uniqueId));  in.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);  in.putExtra(Intent.EXTRA_SHORTCUT_NAME, title);  in.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,                    Intent.ShortcutIconResource.fromContext(                            BrowserBookmarksPage.this,                            R.drawable.ic_launcher_shortcut_browser_bookmark));  in.setAction("com.android.launcher.action.INSTALL_SHORTCUT"); //or   in.setAction(Intent.ACTION_CREATE_SHORTCUT);   sendBroadcast(in);

Update

The browser does not recognise the intent scheme, so there is no way you can add a shortcut to your webpage from your webpage.