在机器上本身可以打开 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/* }

解决方案 »

  1.   

    不行,换成 video/* 之后,提示:“无法播放此视频”,有什么分析方法吗?
      

  2.   

    我有解决方案:http://www.hiapk.com/viewthread.php?tid=357231&extra=&page=1
      

  3.   

     Intent intent = new Intent(Intent.ACTION_VIEW);不能用ACTION_VIEW吧;
      

  4.   

    分析表面,使用 ACTION_VIEW 本身没有问题,把 flash/* 替换成 */* 的时候能够出现系统提示,选择打开文件的应用软件,选择 flash 播放器,可以播放,说明只是类型字符串有问题;希望只是这款设备的问题。
      

  5.   

    播放器需要支持flash格式文件才能播放,实在不行就不要设置MIME类型,那么就会转到浏览器观看(只要浏览器支持Flash插件)。