Android WebView shouldInterceptRequest?
Android WebView shouldInterceptRequest?
I need to intercept android requests. I passed an HTTPClient and implemented shouldInterceptRequest.
The doc says
If the return value is null, the WebView will continue to load the resource as usud
But when I return the value of super or return null it breaks and won't load the webview? Any thoughts?
class WebViewClientImpl(val webView: WebView): WebViewClient() {
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
override fun shouldInterceptRequest(view: WebView?, request: WebResourceRequest?): WebResourceResponse? {
retuen null
}
}
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Comments
Post a Comment