0
我有下面的代码编程方式打开文件:如何以编程方式使用Intents打开文件?
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, type);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
但现在我需要设置的MIME类型的文件,这是不是对所有文件的通用方法。没有定义类型通过Intent打开文件是否有意义?