Hi, i want create a directory and file in my ionic 2 app.
I add cordova-plugin-file for that, and i test on android device emulator with AVD manager.
My code :
let targetPath = cordova.file.documentsDirectory;
console.log(targetPath); // print: file:///data/data .... /files/, it's okay
// CheckDir works!
File.checkDir(targetPath, 'files').then((data) => ....,
(data) => ...);
// Not works : reject with FileError{code = 'JSON Error'}
File.createDir(targetPath, 'toto', true).then((data) => ...),
(data) => );
i follow this doc http://ionicframework.com/docs/v2/native/file
What is the problem?
Thanks!