I am trying to open new window with android browser using "_blank". I listen with this event.
mWebView.getSettings().setSupportMultipleWindows(true);
mWebView.setWebChromeClient(new WebChromeClient() {
@Override
public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture, android.os.Message resultMsg)
{
WebView.HitTestResult result = view.getHitTestResult();
String data = result.getExtra();
Context context = view.getContext();
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(data));
context.startActivity(browserIntent);
return false;
}
});
But it opens only image url when clicking on Image Link . Not link. How to get anchor from WebView.HitTestResult. I don't want to open image type url. Thank you for interesting . Kindly help me Please.