Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#pubctors) \| [Methods](https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#inhmethods)

# SafeBrowsingResponse

*** ** * ** ***

` public abstract class SafeBrowsingResponse `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.webkit.SafeBrowsingResponse |

<br />

*** ** * ** ***

Used to indicate an action to take when hitting a malicious URL. Instances of this class are created by the WebView and passed to `https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse)`. The host application must call `https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#showInterstitial(boolean)`, `https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#proceed(boolean)`, or `https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#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 `https://developer.android.com/reference/android/webkit/WebView#getSafeBrowsingPrivacyPolicyUrl()`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#SafeBrowsingResponse()() ` *This constructor is deprecated. This class should not be constructed by applications.* |

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#backToSafety(boolean)(boolean report) ` Act as if the user clicked the "back to safety" button. |
| ` abstract void` | ` https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#proceed(boolean)(boolean report) ` Act as if the user clicked the "visit this unsafe site" button. |
| ` abstract void` | ` https://developer.android.com/reference/android/webkit/SafeBrowsingResponse#showInterstitial(boolean)(boolean allowReporting) ` Display the default interstitial. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### SafeBrowsingResponse

Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SafeBrowsingResponse ()
```

<br />

**This constructor is deprecated.**   

This class should not be constructed by applications.

<br />

<br />

## Public methods

### backToSafety

Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void backToSafety (boolean report)
```

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

<br />

| Parameters ||
|---|---|
| `report` | `boolean`: `true` to enable Safe Browsing reporting. <br /> |

### proceed

Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void proceed (boolean report)
```

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

<br />

| Parameters ||
|---|---|
| `report` | `boolean`: `true` to enable Safe Browsing reporting. <br /> |

### showInterstitial

Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void showInterstitial (boolean allowReporting)
```

Display the default interstitial.

<br />

| Parameters ||
|---|---|
| `allowReporting` | `boolean`: `true` if the interstitial should show a reporting checkbox. <br /> |