ReceivedSslErrorEvent

class ReceivedSslErrorEvent(val view: WebView, val handler: SslErrorHandler, val error: SslError) : SyncHandlerEvent

Notify the host application that an SSL error occurred while loading a resource. The host application must call either SslErrorHandler.cancel or SslErrorHandler.proceed. Note that the decision may be retained for use in response to future SSL errors. The default behavior is to cancel the load.

This API is only called for recoverable SSL certificate errors. In the case of non-recoverable errors (such as when the server fails the client), WebView will call ReceivedErrorEvent with WebViewClient.ERROR_FAILED_SSL_HANDSHAKE.

Applications are advised not to prompt the user about SSL errors, as the user is unlikely to be able to make an informed security decision and WebView does not provide any UI for showing the details of the error in a meaningful way.

Application overrides of this method may display custom error pages or silently log issues, but it is strongly recommended to always call SslErrorHandler.cancel and never allow proceeding past errors.

Constructors

Link copied to clipboard
constructor(view: WebView, handler: SslErrorHandler, error: SslError)

Properties

Link copied to clipboard

The SSL error object.

Link copied to clipboard

An SslErrorHandler that will handle the user's response.

Link copied to clipboard
Link copied to clipboard

The WebView that is initiating the callback.

Functions

Link copied to clipboard