I want to check if certain URL is finished loading, and then load another URL and if that new url is finished loading do something, how?
I know how to check if certain URL is finished loading like this:
webView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
// do stuff here
}
});
But what I want is:
if url1 finished loading:
load url2
if url2 finished loading:
//do some stuff here
How can I do this?
The url String parameter of onPageFinished always returns the actual URL loaded in the WebView.
You should do something like this: