unable to pick files like pdf,doc,ppt in MARSHAMALLOW file chooser
<p>I am uploading files like pdf,ppt,doc etc to server using from my android app but in marshmallow when file chooser opens and i browse my Sdcard or internal storage there are two problmes :<br>
  1. it shows all files like images,videos and documents etc which i cannot pick but i used intent type as application/pdf; appkication/ppt etc.,so it should let me pick those files.<br>
  2. secondly when i use external file manager like ES file explorer etc it then show all files like images,videos,documents,apks and this time it lets me choose any type of file<br>
  <strong>here is my code for file chooser</strong>  </p>

<pre><code>Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
            intent.setType("application/pdf;application/docx;application/xlsx;application/pptx;application/pptx;application/txt");
            startActivityForResult(intent, PICK_FILE_REQUEST);  
</code></pre>

<p><strong>i am using marshmallow and i think it happens only in marshmallow as i dont have other devices earby to test this code on so help me here Thanks</strong> </p>

<p>i tried it like this  </p>

<pre><code>intent.setType("application/pdf|application/docx|application/xlsx|application/pptx|application/txt");
</code></pre>

<p>but it didnt let me chose any file  but if i use only one MIME type like pdf or docx then it works and let me pick pdf or docx and i searched across internet and found this way to use multiple MIME type that is by using | instead of ; and for most of users it works fine but dont for me.</p>