How to Get Loaded Web Page Title in Android WebView?

If you need to fetch the title of the webpage displayed in a WebView inside an Android app then there are two ways to do it.

You can get the webpage title using WebChromeClient in lesser time than using WebViewClient.

webview.setWebChromeClient(new WebChromeClient() {
public void onReceivedTitle(WebView view, String title) {

But there’s an issue with using onReceivedTitle. It doesn’t get invoked on goBack. So the alternative is to use the onPageFinished method of WebViewClient.

You’ll have to use a custom WebViewClient to get this done. You will override the onPageFinished() method so when a new page finishes loading you can set the webview to the appropriate title.

WebView mWebView = (WebView) findViewById(;
mWebView.setWebViewClient(new WebViewClient() {
    public void onPageFinished(WebView view, String url) {

This content has been helpful to you?

Thanks for contributing!

Yes No