Build 1.0_r1(from source)

android.webkit.gears
Class DesktopAndroid

java.lang.Object
  extended by android.webkit.gears.DesktopAndroid

public class DesktopAndroid
extends Object

Utility class to create a shortcut on Android


Constructor Summary
DesktopAndroid()
           
 
Method Summary
static void setShortcut(WebView webview, String title, String url, String imagePath)
          Create a shortcut for a webpage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesktopAndroid

public DesktopAndroid()
Method Detail

setShortcut

public static void setShortcut(WebView webview,
                               String title,
                               String url,
                               String imagePath)
Create a shortcut for a webpage.

To set a shortcut on Android, we use the ACTION_INSTALL_SHORTCUT from the default Home application. We only have to create an Intent containing extra parameters specifying the shortcut.

Note: the shortcut mechanism is not system wide and depends on the Home application; if phone carriers decide to rewrite a Home application that does not accept this Intent, no shortcut will be added.

Parameters:
webview - the webview we are called from
title - the shortcut's title
url - the shortcut's url
imagePath - the local path of the shortcut's icon

Build 1.0_r1(from source)

Please submit a feedback, bug or feature