开发者

WebView won't play embedded flash video

I am testing on a Xoom device, running OS 3.2. The project is built (in Eclipse) using the 3.1 library.

I have the latest version of flash installed, and embedded flash plays fine in my tablet's browser.

If I create an activity like this:

WebView browser = (WebView) findViewById(R.id.browserView);
browser .getSettings().setJavaScriptEnabled(true);
browser .getSettings().setPluginsEnabled(true);
browser .loadUrl("http://m.kongregate.com/games/Jiggmin/the-game-of-disorientation-mobile");

Then I hear the sound playing for the flash, but it shows up as a white box.

Similarly, any other page with embedded flash has the same problem. I've also tried making a string containing static HTML content, and loading that into the browser... but it has the same problem.

I've read every solution I could find online, from setting the view to invisible until the onPageFinish event is called, to extending the WebView class, and paining over it. I've tried reflection, to call hidden properties on the WebView's sett开发者_StackOverflowings for enabling flash, etc. Nothing works.

Please help!

Thanks,

Mat


You can find my answer here :

Try to build your application with the latest android Api ( http://developer.android.com/guide/practices/optimizing-for-3.0.html#Upgrading ), and activate hardware acceleration (same link, just a little below) on your activity that need to display flash.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜