You have to use WebSettings to activate the plugins for a WebView.
WebSettings settings = webView.getSettings();
settings.setPluginState(PluginState.ON);
On Mon, Jul 5, 2010 at 9:15 PM, timeToEat <[email protected]> wrote:
> I have a swf file on the sdcard and I wrote a html file flash.html
> with the swf file embeded. The only way to open it now is
> 1) open the browser
> 2) type in file:///sdcard/flash.html The swf runs fine.
>
> But if use the code list below:
> Uri uri = Uri.parse("file:///sdcard/flash.html");
> Intent intent = new Intent(Intent.ACTION_VIEW, uri);
> startActivity(intent);
> It shows the error: The application has stopped unexpectly.
>
> I also tried the following code using WebView:
> WebView browser = (WebView) findViewById(R.id.list_web);
> browser.loadUrl("file:///sdcard/flash.html");
>
> The Webview showed up, but the area should start the swf is empty.
>
> So is there a way to open the html through code?
>
> I also think if there is a way to open the android browser using
> ACTION_VIEW by a simple html then reset the URL to be "file:///sdcard/
> flash.html" through code?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en