title: Select docx, doc, rtf, pdf type of file from SD card or with any application in android
body: <p>Currently I am trying to select particular type of file from SD card or with any application but I failed, my code is as follows,</p>
  
  <pre><code>Intent intent;
          if (Build.VERSION.SDK_INT &gt; Build.VERSION_CODES.KITKAT)
              intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
          else
              intent = new Intent(Intent.ACTION_GET_CONTENT);
  
          intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
          intent.addCategory(Intent.CATEGORY_OPENABLE);
          intent.setType("application/pdf|application/msword|application/vnd.openxmlformats-officedocument.wordprocessingml.document" +
                  "|application/vnd.openxmlformats-officedocument.wordprocessingml.template" +
                  "|application/vnd.ms-word.document.macroEnabled.12" +
                  "|application/vnd.ms-word.template.macroEnabled.12" +
                  "!application/vnd.ms-word.template.macroEnabled.12|application/rtf");
  
          startActivityForResult(intent, Constants.ImagePicker.REQ_PICK_RESUME);
  </code></pre>
  
  <p>but it just select every type of file.</p>