# SafeBrowsingResponseCompat

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/SafeBrowsingResponseCompat.java+class:androidx.webkit.SafeBrowsingResponseCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

*** ** * ** ***


```
abstract class SafeBrowsingResponseCompat
```

<br />

*** ** * ** ***

Compatibility version of `https://developer.android.com/reference/android/webkit/SafeBrowsingResponse.html`.

## Summary

| ### Public functions |
|---|---|
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(name = https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature.SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported") https://developer.android.com/reference/kotlin/androidx/webkit/SafeBrowsingResponseCompat#backToSafety(boolean)(report: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Act as if the user clicked the "back to safety" button. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(name = https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature.SAFE_BROWSING_RESPONSE_PROCEED, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported") https://developer.android.com/reference/kotlin/androidx/webkit/SafeBrowsingResponseCompat#proceed(boolean)(report: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Act as if the user clicked the "visit this unsafe site" button. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresFeature(name = https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature.SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported") https://developer.android.com/reference/kotlin/androidx/webkit/SafeBrowsingResponseCompat#showInterstitial(boolean)(allowReporting: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Display the default interstitial. |

## Public functions

### backToSafety

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@RequiresFeature(name = WebViewFeature.SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
abstract fun backToSafety(report: Boolean): Unit
```

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

| Parameters |
|---|---|
| `report: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` to enable Safe Browsing reporting. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException.html` | if the `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature#SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY()` feature is not supported. This should be checked before use with `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`. |

### proceed

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@RequiresFeature(name = WebViewFeature.SAFE_BROWSING_RESPONSE_PROCEED, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
abstract fun proceed(report: Boolean): Unit
```

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

| Parameters |
|---|---|
| `report: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` to enable Safe Browsing reporting. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException.html` | if the `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature#SAFE_BROWSING_RESPONSE_PROCEED()` feature is not supported. This should be checked before use with `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`. |

### showInterstitial

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@RequiresFeature(name = WebViewFeature.SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
abstract fun showInterstitial(allowReporting: Boolean): Unit
```

Display the default interstitial.

| Parameters |
|---|---|
| `allowReporting: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the interstitial should show a reporting checkbox. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException.html` | if the `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature#SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL()` feature is not supported. This should be checked before use with `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`. |