Ooops I posted this to the main Hero forum yesterday by mistake - it is more properly and Android developer post specific to the Hero. . . .
I've been trying to run Flash in a Webview on my Hero.
Flash runs in the standard Browser okay, but I get the 'missing plugin' icon when trying to view anthing with Flash in the WebView.
I'm not sure if it has been disabled, or I just haven't found the right settings. I'm using the standard,
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setPluginsEnabled(true);
Then I'm also calling (through reflection) the 'setFlashPlayerEnabled' method described by cyanogen
http://xdaforums.com/showthread.php?t=521221
//Set Flash Player Enabled
Boolean[] input={new Boolean(true)};
try{
Class cl=Class.forName("android.webkit.WebSettings");
Class[] par=new Class[1];
par[0]=Boolean.TYPE;
Method mthd=cl.getMethod("setFlashPlayerEnabled",par);
mthd.invoke(mWebView.getSettings(),input);
mWebView.loadUrl("file:///android_asset/index.html");
}catch(Exception e){}
But still no Flash in the WebView.
Is there anything else that needs to be called?
How about
setPluginsPath("")
. . . . what path should that call on the Hero?
I've been trying to run Flash in a Webview on my Hero.
Flash runs in the standard Browser okay, but I get the 'missing plugin' icon when trying to view anthing with Flash in the WebView.
I'm not sure if it has been disabled, or I just haven't found the right settings. I'm using the standard,
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setPluginsEnabled(true);
Then I'm also calling (through reflection) the 'setFlashPlayerEnabled' method described by cyanogen
http://xdaforums.com/showthread.php?t=521221
//Set Flash Player Enabled
Boolean[] input={new Boolean(true)};
try{
Class cl=Class.forName("android.webkit.WebSettings");
Class[] par=new Class[1];
par[0]=Boolean.TYPE;
Method mthd=cl.getMethod("setFlashPlayerEnabled",par);
mthd.invoke(mWebView.getSettings(),input);
mWebView.loadUrl("file:///android_asset/index.html");
}catch(Exception e){}
But still no Flash in the WebView.
Is there anything else that needs to be called?
How about
setPluginsPath("")
. . . . what path should that call on the Hero?