1

I am using this compile('com.droidninja:filepicker:1.0.8') library in my app gradle. How to display only in pdf need to remove other extension.

Github path: https://libraries.io/github/AndroidVinay/Android-FilePicker

Konrad Krakowiak
  • 12,285
  • 11
  • 58
  • 45

2 Answers2

0

As stated in lib documentation :

If you want to add custom file type picker, use addFileSupport() method like this (for pdf support):

       String[] pdfTypes = {".pdf"};
       addFileSupport("PDF", pdfTypes, R.drawable.ic_pdf_icon);
Madhur
  • 3,303
  • 20
  • 29
0
    Intent intentPDF = new Intent(Intent.ACTION_GET_CONTENT);
    intentPDF.setType("application/pdf");
    intentPDF.addCategory(Intent.CATEGORY_OPENABLE);
    startActivityForResult(intentPDF, PICK_FILE_PDF);
Muhamed El-Banna
  • 593
  • 7
  • 21