SafeBrowsingResponse
abstract class SafeBrowsingResponse
| kotlin.Any | |
| ↳ | 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 android.webkit.WebViewClient#onSafeBrowsingHit. 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 android.webkit.WebView#getSafeBrowsingPrivacyPolicyUrl().
Summary
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| abstract Unit |
backToSafety(report: Boolean)Act as if the user clicked the "back to safety" button. |
| abstract Unit |
Act as if the user clicked the "visit this unsafe site" button. |
| abstract Unit |
showInterstitial(allowReporting: Boolean)Display the default interstitial. |
Public constructors
SafeBrowsingResponse
SafeBrowsingResponse()
Deprecated: This class should not be constructed by applications.
Public methods
backToSafety
abstract fun backToSafety(report: Boolean): Unit
Act as if the user clicked the "back to safety" button.
| Parameters | |
|---|---|
report |
Boolean: true to enable Safe Browsing reporting. |
proceed
abstract fun proceed(report: Boolean): Unit
Act as if the user clicked the "visit this unsafe site" button.
| Parameters | |
|---|---|
report |
Boolean: true to enable Safe Browsing reporting. |
showInterstitial
abstract fun showInterstitial(allowReporting: Boolean): Unit
Display the default interstitial.
| Parameters | |
|---|---|
allowReporting |
Boolean: true if the interstitial should show a reporting checkbox. |