android.webkit.gears
Class DesktopAndroid
java.lang.Object
android.webkit.gears.DesktopAndroid
public class DesktopAndroid
- extends Object
Utility class to create a shortcut on Android
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DesktopAndroid
public DesktopAndroid()
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 fromtitle - the shortcut's titleurl - the shortcut's urlimagePath - the local path of the shortcut's icon
Please submit a feedback, bug or feature