Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to embed HTML code in Android app?
    primarykey
    data
    text
    <p>I am writing an app for which I need to embed HTML object in the Android app, I followed the tutorial given here: <a href="http://mobile.tutsplus.com/tutorials/android/android-sdk-embed-a-webview-with-the-webkit-engine/" rel="nofollow">http://mobile.tutsplus.com/tutorials/android/android-sdk-embed-a-webview-with-the-webkit-engine/</a> and modified the code accordingly, following is the code, but I am getting a white screen...</p> <pre><code> public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView engine = (WebView) findViewById(R.id.web_engine); engine.getSettings().setJavaScriptEnabled(true); engine.getSettings().setPluginsEnabled(true); engine.getSettings().setAppCacheEnabled(false); engine.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); String data = "&lt;html&gt;" + "&lt;body&gt;" + "bb"+ "&lt;object width=\"450\" height=\"300\" align=\"middle\"&gt;&lt;param name=\"movie\" value=\"http://www.raaga.com/widgets/top10/widgettopten.swf?l=H&amp;q=1\" /&gt;&lt;param name=\"wmode\" value=\"transparent\"&gt;&lt;embed src=\"http://www.raaga.com/widgets/top10/widgettopten.swf?l=H&amp;q=1\" width=\"450\" height=\"300\" align=\"middle\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" FlashVars=\"gig_lt=1312323434023&amp;gig_pt=1312325057958&amp;gig_g=2\"/&gt; &lt;param name=\"FlashVars\" value=\"gig_lt=1312323434023&amp;gig_pt=1312325057958&amp;gig_g=2\" /&gt;&lt;/object&gt;"+ "gg"+ "&lt;/body&gt;" + "&lt;/html&gt;"; engine.loadData(data, "text/html", "UTF-8"); } } </code></pre> <p>The object that I want to embed is:</p> <pre><code>&lt;object width="450" height="300" align="middle"&gt;&lt;param name="movie" value="http://www.raaga.com/widgets/top10/widgettopten.swf?l=H&amp;q=1" /&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.raaga.com/widgets/top10/widgettopten.swf?l=H&amp;q=1" width="450" height="300" align="middle" type="application/x-shockwave-flash" wmode="transparent" FlashVars="gig_lt=1312323434023&amp;gig_pt=1312326303531&amp;gig_g=2"/&gt; &lt;param name="FlashVars" value="gig_lt=1312323434023&amp;gig_pt=1312326303531&amp;gig_g=2" /&gt;&lt;/object&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload