-2

I'm building an android application with basic html/css/js and trying to compile it with Android Studio but somehow it compiles succesfully and turn it into an apk file and run but app won't load iframes.

I've searched over the internet and applied these steps given in here and other suggestions on other forums.

Other scripts in HTML, JS files and CSS animations work properly so I expect it to load iframes too (like cordova does) but doing

webView= (WebView) findViewById(R.id.webview); webView.setWebChromeClient(new WebChromeClient()); webView.setWebViewClient(new WebViewClient()); webView.getSettings().setJavaScriptEnabled(true); 

won't work.

1

1 Answer 1

0

You can create String with HTML

String html = "<iframe width=\"450\" height=\"260\" style=\"border: 1px solid #cccccc;\" src=\"http://api.thingspeak.com/channels/31592/charts/1?width=450&height=260&results=60&dynamic=true\" ></iframe>"; 

after that call the method loadData():

webview.loadData(html, "text/html", null); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.