views:

28

answers:

0

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, how can I do it?

I also think if there is a way to open the android browser using ACTION_VIEW by a simple html then reset the URL through code?