Filter the type of files that's displayed in FileChooser

#1

This is my code that implements FileChooser

selectFile(){
this.fileChooser.open()
.then(uri => {
this.otherFiles.push(uri);
this.filePath.resolveNativePath(uri).then( file=> {
var filename = file.substr(file.lastIndexOf(’/’) + 1);
this.otherFilesNames.push(filename);
console.log("file: " + file);
console.log("filename: " + filename);
}).catch(err => console.log(err))

})
.catch(e => console.log(e));

}

But I want to limit the kind of files that’s being displayed by the FileChooser, for example I just want it to show PDF file. Can I do that?

#2

I am also having this issue. Please have you found a solution to this problem yet. Please is there anyone who can help solve this issue? Thank you.