Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 settings for enabling flash, etc. Nothing works.

Please help!

Thanks,

Mat

like image 201
Mat DeLong Avatar asked Nov 04 '22 15:11

Mat DeLong


1 Answers

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.

like image 65
NitroG42 Avatar answered Nov 15 '22 12:11

NitroG42