1

I have tried to use the following code but it's showing me all kind of files in the selection. I just want file chooser manu to show only .pptx(Powerpoint) files.

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("application/pptx");
startActivityForResult(intent, PICK_DOC_REQUEST_CODE);

A help would be appreciated!

android_griezmann
  • 3,757
  • 4
  • 16
  • 43
  • Below link is clear your doubt Refer the link [http://stackoverflow.com/questions/37002320/unable-to-pick-files-like-pdf-doc-ppt-in-marshamallow-file-chooser](http://stackoverflow.com/questions/37002320/unable-to-pick-files-like-pdf-doc-ppt-in-marshamallow-file-chooser) – Vadivel Nov 17 '16 at 05:25
  • try below link to get exact file format,[http://stackoverflow.com/questions/24304464/android-get-file-path-of-a-selected-pdf-doc-ppt-or-xls-in-my-app?rq=1](http://stackoverflow.com/questions/24304464/android-get-file-path-of-a-selected-pdf-doc-ppt-or-xls-in-my-app?rq=1) – Vadivel Nov 17 '16 at 05:27
  • @Vadivel I have already tried that out! Thanks for the help though. – android_griezmann Nov 17 '16 at 05:33

1 Answers1

3

I just found a solution by myself by setting up the following mime-type.

intent.setType("application/vnd.openxmlformats-officedocument.presentationml.presentation");

It works like a charm!

android_griezmann
  • 3,757
  • 4
  • 16
  • 43