to top
Android APIs
public class

WebViewDatabase

extends Object
java.lang.Object
   ↳ android.webkit.WebViewDatabase

Class Overview

This class allows developers to determine whether any WebView used in the application has stored any of the following types of browsing data and to clear any such stored data for all WebViews in the application.

  • Username/password pairs entered into web forms
  • HTTP authentication username/password pairs
  • Data entered into text fields (e.g. for autocomplete suggestions)

Summary

Constants
String LOGTAG
Public Methods
void clearFormData()
Clears any stored previously-entered form data.
void clearHttpAuthUsernamePassword()
Clears any HTTP authentication username/passwords that are saved.
void clearUsernamePassword()
Clears any username/password combinations saved from web forms.
synchronized static WebViewDatabase getInstance(Context context)
boolean hasFormData()
Gets whether there is any previously-entered form data saved.
boolean hasHttpAuthUsernamePassword()
Gets whether there are any HTTP authentication username/password combinations saved.
boolean hasUsernamePassword()
Gets whether there are any username/password combinations from web pages saved.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

protected static final String LOGTAG

Since: API Level 1

Constant Value: "webviewdatabase"

Public Methods

public void clearFormData ()

Since: API Level 1

Clears any stored previously-entered form data.

public void clearHttpAuthUsernamePassword ()

Since: API Level 1

Clears any HTTP authentication username/passwords that are saved.

public void clearUsernamePassword ()

Since: API Level 1

Clears any username/password combinations saved from web forms.

public static synchronized WebViewDatabase getInstance (Context context)

Since: API Level 1

public boolean hasFormData ()

Since: API Level 1

Gets whether there is any previously-entered form data saved.

Returns
  • true if there is form data saved

public boolean hasHttpAuthUsernamePassword ()

Since: API Level 1

Gets whether there are any HTTP authentication username/password combinations saved.

Returns
  • true if there are any HTTP authentication username/passwords saved

public boolean hasUsernamePassword ()

Since: API Level 1

Gets whether there are any username/password combinations from web pages saved.

Returns
  • true if there are any username/passwords used in web forms saved