nativescript-mediafilepicker icon indicating copy to clipboard operation
nativescript-mediafilepicker copied to clipboard

Android: Can't detect PDF files in openFilePicker()

Open paul-castro opened this issue 4 years ago • 3 comments

Platform: Android (emulator and device)

Issue: No PDF files detected on using openFilePicker(), only image files

Code:

pickFile(type) {
    let extensions = [];
    let that = this;

  if (isAndroid) {
        extensions = ['pdf'];
    } else {
        extensions = [kUTTypePDF, kUTTypeText];
    }
    
    let options: FilePickerOptions = {
        android: {
            extensions: extensions,
            maxNumberFiles: 1
        },
        ios: {
            extensions: extensions,
            multipleSelection: false
        }
    };
    
    let mediafilepicker = new Mediafilepicker(); 
    mediafilepicker.openFilePicker(options);
}

paul-castro avatar Aug 07 '20 09:08 paul-castro

Yes. I have same issue but It seems to be an issue with android 10. Its been reported on the Library's repo https://github.com/fishwjy/MultiType-FilePicker/issues/63#issue-595730274

MohammedBashiru avatar Aug 07 '20 17:08 MohammedBashiru

are there solutions for this kind of matter?

nituwda avatar Sep 12 '21 07:09 nituwda

same here, still

csimpi avatar Jan 01 '23 00:01 csimpi