android 2.2 open swf in browser

by timeToEat » Thu, 08 Jul 2010 02:32:16 GMT

Sponsored Links
 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);
It shows the error: The application has stopped unexpectly.

I also tried the following code using WebView:
WebView browser = (WebView) findViewById(;

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?


android 2.2 open swf in browser

by Raju Bitter » Thu, 29 Jul 2010 19:07:41 GMT

 You have to use WebSettings to activate the plugins for a WebView.

        WebSettings settings = webView.getSettings();


Sponsored Links

Other Threads

1. Locale and Orientation Problem

Hi All,

In my application I am supposed to use two languages and the two
orientations(landscape and protrait). I want your suggestions to solve
this problem. The thing is should I use 2 different User Interfaces
for the 2 languages, So that i'll have 4 UIs for 2 languages. Is this
the correct way to use or is there any other Idea.

Please, I need a suggestion in this aspect my dear friends.

Thanks & Regards.


2. Problem in fix the value in EditText


     I am trying to fix the value in the edittext but it not  shows in
the run time.
     I am trying this like  android:text="edittext" in xml layout it
shows in the design time but when i run it shows blank.
  plaese tell me the right process how can i fix it.
ankush mishra


3. Share via SMS/Email/Facebook/Twitter - sample code?

4. Message not getting poste

5. Question on versioning and localization of an android app

6. Return value from Parcelable.describeContents()

7. Loop an audio through microphone in Android ?