开发者

using flash with android webview

I want to use flash in webview.

I used following code..

 mWebView = (WebView) findViewById(R.id.webview);
 mWebView.getSettings().setPluginsEnabled(true);
 mWebView.loadUrl("http://domain-path/flash/test.html");

The test.html is containing flash object embedded.

But when I run this it displays nothing.开发者_Go百科

Please suggest.....


try to add

webView.getSettings().setPluginsEnabled(true);
webView.getSettings().setPluginState(PluginState.ON);


it's because you browser doesn't have a flash player. you need to install flash player 10.1


I've the same problem. And i've observed that Flash object is embedded but not visible. if i double click the screen, then flash object i can see.

Quick tip: in your html file, set autoplay=true for video, so that webview you can hear the audio.

let me know, if you find the fix already


Have you added permissions to your AndroidManifest.xml?

<uses-permission android:name="android.permission.INTERNET"/>

I'm always fogetting permissions


First of all be sure to have internet permissions into your AndroidManifest.xml?

<uses-permission android:name="android.permission.INTERNET"/>

then:

WebSettings webSettings = myWebView.getSettings();
WebSettings.setPluginsEnabled(true);
webSettings.setPluginState(PluginState.ON);


Chrome for Android will not be supporting Flash. As you may have seen in November, 2011, Adobe announced it has stopped investing in Flash for mobile browsing. Google has long been committed to making the web platform more powerful through open web technologies like HTML5 and is working with Adobe and other partners to further advance the web standard. You may have to install morzilla for using flash in android

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜