androidOnSafeBrowsingHit method

Future<SafeBrowsingResponse?>? androidOnSafeBrowsingHit(
  1. Uri url,
  2. SafeBrowsingThreat? threatType
)

Event fired when the WebView notifies that a loading URL has been flagged by Safe Browsing. The default behavior is to show an interstitial to the user, with the reporting checkbox visible.

url represents the url of the request.

threatType represents the reason the resource was caught by Safe Browsing, corresponding to a SafeBrowsingThreat.

NOTE: available only on Android 27+.

Official Android API: https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse)

Implementation

Future<SafeBrowsingResponse?>? androidOnSafeBrowsingHit(
    Uri url, SafeBrowsingThreat? threatType) {
  return null;
}