A Brief Analysis of the differences between WebChromeClient and WebViewClient in Android

  • 2020-06-19 11:41:30
  • OfStack

1. WebViewClient is to help WebView handle various notification and request events, specifically, onLoadResource, onPageStart, onPageFinish, onReceiveError, onReceivedHttpAuthRequest

2. WebChromeClient is the dialog box, website icon, website title, loading progress, etc. that assists WebView to process Javascript

onCloseWindow(turn off WebView), onCreateWindow(), onJsAlert (alert on WebView doesn't pop out, you need to customize your WebChromeClient handle to pop out)onJsPrompt, onJsConfirm, onProgressChanged, onReceivedIcon, onReceivedTitle


Related articles: