Hello, we are making an app with ionic 2, which uses the plugin of file opener, is running with versions of android less than 6.0, when running it in higher versions throw the following error: file:///storage/emulated/0/PV-2016-00003786-%20%20%20-AAMVUNO.pdf exposed beyond app through Intent.getData()
, I was reading online, I would have to add a provider in The android manifest, but I still do not work, I rely on the following link:http://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed
I attach the code
createDocAndDisplay(documento:Blob, numeroSADE:string){
File.writeFile(cordova.file.externalRootDirectory,`${numeroSADE}.pdf`,documento,true).then(t=>{
FileOpener.open(cordova.file.externalRootDirectory + numeroSADE + '.pdf','application/pdf').then(()=>{
}).catch(err=>{
console.log('Error al abrir el archivo con el plugin fileOpener', err);
});
})
.catch(err=>console.log('Error al crear el documento obtenido',err));
}