Android
android.webkit
public final class

android.webkit.WebIconDatabase

java.lang.Object
android.webkit.WebIconDatabase

Functions for manipulating the icon database used by WebView. These functions require that a WebView be constructed before being invoked and WebView.getIconDatabase() will return a WebIconDatabase object. This WebIconDatabase object is a single instance and all methods operate on that single object.

Nested Classes
WebIconDatabase.IconListener Interface for receiving icons from the database. 

Summary

Public Methods

          void  close()
Close the shared instance of the icon database.
      static    WebIconDatabase  getInstance()
Get the global instance of WebIconDatabase.
          void  open(String path)
Open a the icon database and store the icons in the given path.
          void  releaseIconForPageUrl(String url)
Release the icon for the given page url.
          void  removeAllIcons()
Removes all the icons in the database.
          void  requestIconForPageUrl(String url, WebIconDatabase.IconListener listener)
Request the Bitmap representing the icon for the given page url.
          void  retainIconForPageUrl(String url)
Retain the icon for the given page url.
Methods inherited from class java.lang.Object

Details

Public Methods

public void close()

Close the shared instance of the icon database.

public static WebIconDatabase getInstance()

Get the global instance of WebIconDatabase.

Returns

  • A single instance of WebIconDatabase. It will be the same instance for the current process each time this method is called.

public void open(String path)

Open a the icon database and store the icons in the given path.

Parameters

path The directory path where the icon database will be stored.

Returns

  • True if the database was successfully opened or created in the given path.

public void releaseIconForPageUrl(String url)

Release the icon for the given page url.

Parameters

url The page's url.

public void removeAllIcons()

Removes all the icons in the database.

public void requestIconForPageUrl(String url, WebIconDatabase.IconListener listener)

Request the Bitmap representing the icon for the given page url. If the icon exists, the listener will be called with the result.

Parameters

url The page's url.
listener An implementation on IconListener to receive the result.

public void retainIconForPageUrl(String url)

Retain the icon for the given page url.

Parameters

url The page's url.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56