Android APIs
public abstract 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 for web forms
  • HTTP authentication username/password pairs
  • Data entered into text fields (e.g. for autocomplete suggestions)

Summary

Public Constructors
WebViewDatabase()
Public Methods
abstract void clearFormData()
Clears any saved data for web forms.
abstract void clearHttpAuthUsernamePassword()
Clears any saved credentials for HTTP authentication.
abstract void clearUsernamePassword()
This method was deprecated in API level 18. Saving passwords in WebView will not be supported in future versions.
static WebViewDatabase getInstance(Context context)
abstract boolean hasFormData()
Gets whether there is any saved data for web forms.
abstract boolean hasHttpAuthUsernamePassword()
Gets whether there are any saved credentials for HTTP authentication.
abstract boolean hasUsernamePassword()
This method was deprecated in API level 18. Saving passwords in WebView will not be supported in future versions.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public WebViewDatabase ()

Added in API level 22

Public Methods

public abstract void clearFormData ()

Added in API level 1

Clears any saved data for web forms.

See Also

public abstract void clearHttpAuthUsernamePassword ()

Added in API level 1

public abstract void clearUsernamePassword ()

Added in API level 1

This method was deprecated in API level 18.
Saving passwords in WebView will not be supported in future versions.

Clears any saved username/password pairs for web forms. Note that these are unrelated to HTTP authentication credentials.

public static WebViewDatabase getInstance (Context context)

Added in API level 1

public abstract boolean hasFormData ()

Added in API level 1

Gets whether there is any saved data for web forms.

Returns
  • whether there is any saved data for web forms
See Also

public abstract boolean hasHttpAuthUsernamePassword ()

Added in API level 1

Gets whether there are any saved credentials for HTTP authentication.

Returns
  • whether there are any saved credentials

public abstract boolean hasUsernamePassword ()

Added in API level 1

This method was deprecated in API level 18.
Saving passwords in WebView will not be supported in future versions.

Gets whether there are any saved username/password pairs for web forms. Note that these are unrelated to HTTP authentication credentials.

Returns
  • true if there are any saved username/password pairs