I have a webview and on click on some banner I am sending Intent.ACTION_VIEW to open browser or whatever user finds suitable like this:
w.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url != null && url.startsWith("http://")) {
view.getContext().startActivity(
new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;
} else {
return false;
}
}
});
Now what I want is to find a way to know if user just hit back button before opening browser or he actually opened browser. I found this question but no solution there