比如打word,excel,ppt之类的全都可以的,就现在这一段代码就可以了.
File file = new File(dirPath+fileName);
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.addCategory("android.intent.category.DEFAULT");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(Uri.fromFile(file), "application/*");
startActivity(intent);