I have a webview. Everything is working fine but when I am opening a page which has iframe, the iframe is not getting visible. Are there any specific settings required?
following hack worked for me for loading iframes in webview.Hope some one still might find it useful
String webContent="your data to be loaded in webview";
if(webContent.contains("iframe")){
Matcher matcher = Pattern.compile("src=\"([^\"]+)\"").matcher(webContent);
matcher.find();
String src = matcher.group(1);
webContent=src;
try {
URL myURL = new URL(src);
webView.loadUrl(src);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}else {
webView.loadDataWithBaseURL(null, "" + webContent, "text/html", "UTF-8", null);}
}
}
Also do not forget to add Internet permission in your manifest file.