【发布时间】:2016-11-12 19:53:18
【问题描述】:
要让用户有机会通过文件浏览器选择自定义文件(此处为:.oli),需要哪种 mimetype?我已经为 xml 创建了一个。我需要改变什么?
Intent chooseFileXML = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(new Helper(FunctionsActivity.this).getPathToAppFolder());
chooseFileXML.setDataAndType(uri, "text/xml");
Intent intentXML = Intent.createChooser(chooseFileXML, getString(R.string.importXMLDatei));
startActivityForResult(intentXML, REQUEST_CODE_IMPORT_XML_FILE);
【问题讨论】:
标签: java android file browser explorer