Android Flash Page in WebView
There is a web page that contains Flash content that I need to load into a WebView. I have tried with these settings:
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
mWebView.loadUrl(URL);
However the flash portion of the site never loads, it just stays a big white space. The same exact site Flash content and all loads perfectly in the stock browser. Is there something I am missing to get WebView to show Flash content?
Edit: Does WebView.refreshPlugins(boolean reloadPages) have anything to do with it? I have tried putting this in various spots but still no luck.
If you are using Android 3.0 or greater you may need to add android:hardwareAccelerated="true"
to the application
(or activity
depending on where you might have WebViews) attributes in the manifest, I was caught out by this recently.
精彩评论