1

I want to display swf into a webview. The swf didn't display in the web view. I have this message fail(the browser should render some flash content, not this). So I try this code. But I am getting ,swf file in encoded form in webview. What to do to display this swf??

 String url ="file:///android_asset/hoge.swf";

WebView wv=(WebView) findViewById(R.id.WebView01);

wv.getSettings().setPluginsEnabled(true);

wv.loadUrl(url);
mobileDeveloper
  • 894
  • 2
  • 14
  • 35

2 Answers2

0

swf is a flash file. to be able to display flash file, the device should be supporting flash. recently, there's many android device not support flash. so you must be careful. also check whether the device is already installed flash plugin or not.

Fugogugo
  • 4,460
  • 10
  • 36
  • 50
  • Can you give me a link to install the flash plugin in the emulator because i try it one and i have the same problem. – mobileDeveloper Mar 24 '11 at 09:55
  • I don't think flash would run in emulator. it's the hardware matter. but maybe you could try this link http://www.actionscript.org/forums/showthread.php3?t=241683 – Fugogugo Mar 24 '11 at 10:36
0

Lots of questions have been posted regarding this. Check out this question Load an SWF into a WebView

The author their says that you must enable plugins for thewebview

webview.getSettings().setPluginsEnabled(true);
Community
  • 1
  • 1
slayton
  • 20,123
  • 10
  • 60
  • 89