# Print output for @column tags ?> SafeBrowsingResponse - Android SDK | Android Developers

Most visited

Recently visited

SafeBrowsingResponse

public abstract class SafeBrowsingResponse
extends Object

java.lang.Object
   ↳ android.webkit.SafeBrowsingResponse


Used to indicate an action to take when hitting a malicious URL. Instances of this class are created by the WebView and passed to WebViewClient.onSafeBrowsingHit(WebView, WebResourceRequest, int, SafeBrowsingResponse). The host application must call showInterstitial(boolean), proceed(boolean), or backToSafety(boolean) to set the WebView's response to the Safe Browsing hit.

If reporting is enabled, all reports will be sent according to the privacy policy referenced by WebView.getSafeBrowsingPrivacyPolicyUrl().

Summary

Public constructors

SafeBrowsingResponse()

This constructor is deprecated. This class should not be constructed by applications.

Public methods

abstract void backToSafety(boolean report)

Act as if the user clicked the "back to safety" button.

abstract void proceed(boolean report)

Act as if the user clicked the "visit this unsafe site" button.

abstract void showInterstitial(boolean allowReporting)

Display the default interstitial.

Inherited methods

Public constructors

SafeBrowsingResponse

public SafeBrowsingResponse ()

This constructor is deprecated.
This class should not be constructed by applications.

Public methods

backToSafety

public abstract void backToSafety (boolean report)

Act as if the user clicked the "back to safety" button.

Parameters
report boolean: true to enable Safe Browsing reporting.

proceed

public abstract void proceed (boolean report)

Act as if the user clicked the "visit this unsafe site" button.

Parameters
report boolean: true to enable Safe Browsing reporting.

showInterstitial

public abstract void showInterstitial (boolean allowReporting)

Display the default interstitial.

Parameters
allowReporting boolean: true if the interstitial should show a reporting checkbox.