Issue
In my app there is a webview with an advertising html page in it. Some text and some pictures, all of the pictures are nicely shown.
If the user clicks on this page, the webView redirects to m.facebook.com but for some reason the page came up without any images, all of them are missing.
I tried these snippets but none of them solved my issue:
mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript
mWebview.getSettings().setAppCacheEnabled(true);
mWebview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebview.requestFocus(View.FOCUS_DOWN);
mWebview.getSettings().setPluginsEnabled(true);mWebview.getSettings().setSupportMultipleWindows (true);
mWebview.getSettings().supportZoom();
mWebview.canGoBack();
mWebview.getSettings().setBlockNetworkImage(false);
mWebview.getSettings().setBlockNetworkLoads(false);
mWebview.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
Because this app is aleady developed to iOS, i cant do it else, i must show the content in this webview.
Please help if you can! Any suggestions will be appreciated.
Solution
try this...
webview.getSettings().setUserAgentString("Mozilla/5.0 (Linux; U; Android 2.0; en-us; Droid Build/ESD20) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17");
Answered By - MAC
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.