The file manager does not seem to recognize some mime types correctly

221 views
Skip to first unread message

liangliang hu

unread,
May 24, 2021, 10:00:53 AM5/24/21
to Chromium OS Discussion
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.
Screenshot 2021-05-24 16.24.38.png

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)


Mike Frysinger

unread,
May 24, 2021, 10:12:49 AM5/24/21
to hu.lion.l...@gmail.com, Chromium OS Discussion
please file a bug at crbug.com/new, then file OS feedback via Alt+Shift+i referencing that bug, then mention that bug here.
if you have an extension published in the CWS, please link to it in the bug report too.
-mike

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss
Reply all
Reply to author
Forward
0 new messages