如何播放 swf
在机器上本身可以打开 swf 文件(在文件管理器中选择 swf 文件能够打开),但是我的代码不能打开,代码是这样的
try{
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("/sdcard/socket.swf");
if (uri != null)
{
intent.setDataAndType(uri, "flash/*");
startActivity(intent);
}
}catch(Exception e){
ShowDebugMsg("error:"+e.getMessage());
}
结果出现错误是,
error:No activity found to handle Intent{ act=android.intent.action.View dat=/sdcard/socket.swf typ=flash/* }
[解决办法]
flash/*换成vedio/*试试
[解决办法]
我有解决方案:http://www.hiapk.com/viewthread.php?tid=357231&extra=&page=1
[解决办法]
Intent intent = new Intent(Intent.ACTION_VIEW);
不能用ACTION_VIEW吧;
[解决办法]
学习!