Hi,

I am working on a podcasat player and am looking for a sutable intent
to launch and play a downloaded SWF file. I am on 2.2 and have adobe
flash player installed.

The things i have tried are:
This launces the HTC flash player to select a file:

ComponentName toLaunch = new
ComponentName("com.htc.flash","com.htc.flash.FlashPlayer");
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_MAIN);
intent.setComponent(toLaunch);
act.startActivity(intent);

This should launch the file in the htc flash player - but it doesnt
seem to work. the file never plays (I know the file works)
File localFile = new File("/sdcard/test.swf");
url = Uri.fromFile(localFile).toString();
ComponentName toLaunch = new
ComponentName("com.htc.flash","com.htc.flash.FlashPlayer");
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(url), "flash/*");
intent.putExtra("play", file.path);
intent.setComponent(toLaunch);
act.startActivity(intent);

i put the file on the network server and i get this line in the log
file, the file plays ok in the browser:
action=android.intent.action.SEARCH;launchFlags=0x10000000;component=com.android.browser/.BrowserActivity;S.query=192.168.1.2%2Ftst.swf;S.user_query=192.168.1.2%2Ftst.swf;end

So I am wondering if i can just launch the browser to get it to play -
i haven't had any luck yet.
File localFile = new File("/sdcard/test.swf");
url = Uri.fromFile(localFile).toString();
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_SEARCH);
toLaunch = new
ComponentName("com.android.browser","com.android.browser.BrowserActivity");
intent.setData(Uri.parse(url));
intent.setComponent(toLaunch);
act.startActivity(intent);

And i have tried the obvious:
File localFile = new File("/sdcard/test.swf");
url = Uri.fromFile(localFile).toString();
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
act.startActivity(intent);

Has anyone done it before?

-- 
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

Reply via email to