Hi,
Firstly, I am sorry for my poor English. I am developing an Android app for Chrome OS that handles certain types of files (.jpg/.png/.pdf/.doc/.docx/.xls/.xlsx/.ppt/.pptx).The user selects the file to be processed through the file manager, but some file types are not recognized when the file is filtered.As shown in the figure below, you can see that there are some blank places in the filter list.The user needs to select All Files to see other files, but in this case the undesired types of files will also be displayed.
Below is my code:
public String selectFile() {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");
String[] mimeTypes = {
"image/jpeg",
"image/png",
"application/pdf",
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
};
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
intent.addCategory(Intent.CATEGORY_OPENABLE);
startActivityForResult(intent, 1);
}
These codes run fine on my Android mobile devices. What should I do?
additional:my chromebook os viesion:90.0.4430.218 (32bit)