在机器上本身可以打开 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/* }
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/* }
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货