nativescript-imagepicker
nativescript-imagepicker copied to clipboard
I can only select files from the Screenshots and Camera directories
Hello,
I am using tns 6.1.0 and testing on a physical android device (Galaxy S7, Android version 7.0).
When I use the plugin, it takes me directly to the Screenshots directory and I can select files from there, but if I navigate to any other folder, all files are grayed out and not accessible. One exception is the Camera folder, I can load files from there. I am trying to allow the user to pick any files from any folder.
Here is my code:
TS:
let context = imagepicker.create({
mode: "single" // use "multiple" for multiple selection
});
context
.authorize()
.then(function () {
return context.present();
})
.then(function (selection) {
selection.forEach(function (selected) {
// process the selected image
console.dir(selected);
});
}).catch(function (e) {
// process error
console.log(`error: ${e}`);
});
package.json
{
"nativescript": {
"id": "id",
"tns-ios": {
"version": "6.1.0"
},
"tns-android": {
"version": "6.1.2"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"@nstudio/nativescript-loading-indicator": "^2.0.4",
"nativescript-appversion": "^1.4.4",
"nativescript-datetimepicker": "^1.2.2",
"nativescript-drawingpad": "^3.1.0",
"nativescript-drop-down": "^5.0.4",
"nativescript-imagepicker": "^7.1.0",
"nativescript-intl": "^3.0.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-masked-text-field": "^4.0.3",
"nativescript-theme-core": "~1.0.6",
"nativescript-ui-sidedrawer": "~7.0.0",
"rxjs": "^6.4.0",
"tns-core-modules": "6.3.2"
},
"devDependencies": {
"nativescript-dev-webpack": "~1.2.0",
"node-sass": "^4.7.1",
"tns-platform-declarations": "^6.3.2",
"tslint": "~5.19.0",
"typescript": "~3.5.3"
},
"gitHead": "1964ea9e8ca1a0518e0d6370781eedcf6c23db42",
"readme": "NativeScript Application"
}
Am I missing something?