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
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
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);
Intent intentPDF = new Intent(Intent.ACTION_GET_CONTENT);
intentPDF.setType("application/pdf");
intentPDF.addCategory(Intent.CATEGORY_OPENABLE);
startActivityForResult(intentPDF, PICK_FILE_PDF);