Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem loading swf file in android
    text
    copied!<p>I have a problem when I load interactive SWF file in android emulator. I use 2.3.1 AVD.</p> <p>This is the code: </p> <pre><code>package com.androidpeople.view; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class WebViewExample extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); /*WebView webView = (WebView) findViewById(R.id.webview); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("http://www.androidpeople.com"); webView.setWebViewClient(new HelloWebViewClient());*/ String html = "&lt;object width=\"550\" height=\"400\"&gt; &lt;param name=\"movie\" value=\"file:///android_asset/FL.swf\"&gt; &lt;embed src=\"file:///android_asset/FL.swf\" width=\"550\" height=\"400\"&gt; &lt;/embed&gt; &lt;/object&gt;"; String mimeType = "text/html"; String encoding = "utf-8"; WebView wv=(WebView) findViewById(R.id.webview); wv.getSettings().setJavaScriptEnabled(true); wv.getSettings().setPluginsEnabled(true); wv.loadDataWithBaseURL("null", html, mimeType, encoding, ""); wv.setWebViewClient(new HelloWebViewClient()); } } package com.androidpeople.view; import android.webkit.WebView; import android.webkit.WebViewClient; public class HelloWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } </code></pre> <p>Manifest file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidpeople.view" android:versionCode="1" android:versionName="1.0"&gt; &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt; &lt;activity android:name=".WebViewExample" android:label="@string/app_name"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;uses-sdk android:minSdkVersion="5" /&gt; &lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt; &lt;/manifest&gt; </code></pre> <p>Now the problem is that when I run the project, it will give one box at center right side 3D dimension like:</p> <p><img src="https://i.stack.imgur.com/50bjY.png" alt="this is the image"></p> <p>I have also tried to change different-different SWF file but can't get proper solution.</p> <p>Can anyone help me? Thanks.</p>
 

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