I\'m using a WebView in my application, I have a requirement to change the app title based on the page user is on. How can I do this in Android WebView?
I did this i
What if you do not want the whole title, and just a Domain Name, Like if you want to show only 'Google' from www.google.com, and you have all the query parameters in this title.
URL hostUrl= new URL(webView.getUrl());
String title = hostUrl.getHost();
title = title.startsWith("www.") ? title.substring(4) : title;