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);
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?

--



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();
        settings.setPluginState(PluginState.ON);




>


Sponsored Links


Other Threads

1. debugging ril module ....

Hello:
I am trying to reliably debug a system process running in android
emulator, something like the "ril" module.

1/ It would be preferable that I can debug this with eclipse. But it
seems to me that eclipse is to be used for application debugging
rather system processes. When I started DDMS, I only see app's
processes show up there, none of system processes are on this list.
Anyone had tried this with success, please let me know.

2/ The other alternative is to debug this to run gdbserver on the avd
and have adb listen to port 5039. Then get the de{*filter*} attach to the
process running on the avd via adb, port 5039.

The main problem that I am running into is that I can't reliably step
through the code.
I got the below symptoms:

a/ Each time stepping over the code, it would randomly jump to
incorrect source line within the same function, but finish correctly
if I enter "continue"

b/ printing local variable sometimes show incorrect values, but it
would complete correctly if "continued"

c/ along with symptom a/ described above, if I keep step thru the
code, most likely I get segmentation and the process get terminated.

I compiled the code with "-O1 -g", the result is similar when compiled
with "-O2 -g"

If I recompiled the code with "-O0 -g", the set breakpoint won't
break, and gdb does not see the correct source line when setting the
breakpoint. So completely turn of compiler optimization does not seem
to work at all.

Any help is appreciated.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website:  http://www.***.com/ 

2. Indosat unlimited review

Indosat kerjasama dgn im2 katanya bikin broadband unlimited. Saya cuman tau
biaya mingguan 50rb, terus 2minggu 80rb.
Ada yg udah pake? Mohon reviewnya............

cakranexus + xlunlimited

-- 
"Indonesian Android Community [id-android]" 

3. ndk to access native bluetooth lib?

4. Pulling Touch Screen Events

5. Smtp axis

6. How to set logo in the title bar dynamically

7. No need apps2sd