3

i have an swf file in local assets folder i have written the code like

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Context mContext= PanchangamActivity.this;

     WebView wv=new WebView(mContext);
     wv = (WebView)findViewById(R.id.webView1);
     wv.getSettings().setJavaScriptEnabled(true);
     wv.getSettings().setPluginsEnabled(true);
     wv.getSettings().setAllowFileAccess(true);
     wv.loadUrl("file:///android_asset/www/swf2.html");
 }

SWF2.HTML:

 <html>
   <head>
  <meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
</head>
<body>
  <object width="215" height="140">
    <param name="movie" value="flash.swh">
      <embed src="c:\Users\janardhan\Desktop\flash.swf"
           width="215" height="140">
      </embed>
  </object>
</body>

now while running that in android emulator i am gettingenter image description here

please help me! how to solve this

VENKI
  • 88
  • 2
  • 15

2 Answers2

2

What you see is the missing plugin icon, you don't have the Flash Player installed.

I would recommend reading How can I install adobe flash on the android emulator for information on how to get Flash up and running on the emulator.

Community
  • 1
  • 1
Jørgen R
  • 10,568
  • 7
  • 42
  • 59
  • i have tried to install the adobe_flash_player.apk using adb through the command prompt it said success but after restarting the emulator same screen appeared – VENKI Feb 16 '12 at 10:43
  • If that doesn't work, the only thing I can think of is to enable android market on the emulator and download the Flash plugin. – Jørgen R Feb 16 '12 at 11:16
  • i am unable to upload or install any .apk file from to the emulator even after i reinstalled the emulator – VENKI Feb 17 '12 at 14:58
-1

Maybe is just a typo you put here, not in your code, but...

<param name="movie" value="flash.swh">

instead of

<param name="movie" value="flash.swf">

could create some conflicts. And seen you are using

wv.getSettings().setJavaScriptEnabled(true);

I suggest to embed Flash using SWFobject http://code.google.com/p/swfobject/

stv
  • 33
  • 6