I am testing with an Android physical device. Everything works well, except that I am stuck in the /storage/emulated/0/DCIM/Screenshots folder and I cannot navigate to any other folder.
How can I set the plugin to allow folder navigation?
Here is my code:
let extensions = [];
if (page.ios) {
//more types from here: https://developer.apple.com/documentation/mobilecoreservices/uttype/uti_image_content_types
extensions = [kUTTypePDF, kUTTypeImage, kUTTypePNG, kUTTypeJPEG, kUTTypeContent];
} else {
extensions = ['pdf', 'doc', 'docx', 'jpg', 'jpeg', 'gif', 'png'];
}
let options: media.FilePickerOptions = {
android: {
extensions: extensions,
maxNumberFiles: 10
},
ios: {
extensions: extensions,
multipleSelection: true
}
};
let mfp = new media.Mediafilepicker();
mfp.openFilePicker(options)
mfp.on("getFiles", function (res) {
let results = res.object.get('results');
let files: string[] = [];
results.forEach((r: any) => {
files.push(r.file);
});
console.dir(files);
model.set('files', files);
});
mfp.on("error", function (res) {
let msg = res.object.get('msg');
console.log(msg);
});
mfp.on("cancel", function (res) {
let msg = res.object.get('msg');
console.log(msg);
});
I am testing with an Android physical device. Everything works well, except that I am stuck in the /storage/emulated/0/DCIM/Screenshots folder and I cannot navigate to any other folder.
How can I set the plugin to allow folder navigation?
Here is my code: