Intent intent=new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(Uri.fromFile(file), "file/*");
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setDataAndType(Uri.fromFile(file), "file/*.*");
intent.addCategory(Intent.CATEGORY_OPENABLE);
E/CheckPermission: Permission Denial: can't access location pid=17422, uid=10786
上面两种写法都试过了,没有反应,根本没有调用系统文件管理器。
如果把指定路径去掉,就可以打开。要怎么样才可以指定路径打开?
报错是没有权限,可是把指定路径去掉确实可以访问到文件,权限已经添加过了。
有root权限