here im using ionic file transfer plugin for downloading a file and when ever i tried to download the file im getting below error
and also every time i build a file i need to add the below code in android also
public class FileProvider extends androidx.core.content.FileProvider
is there any other alternative for this download . i checked capacitor site but im not sure how to use file storage plugin in that and below is my code using file transfer
pdfUrl = 'https://www.cs.toronto.edu/~hinton/absps/NatureDeepReview.pdf';
constructor(private transfer: FileTransfer, private file: File) {}
download() {
const fileTransfer: FileTransferObject = this.transfer.create();
const url = this.pdfUrl;
fileTransfer.download(url, this.file.dataDirectory).then((entry) => {
console.log('download complete: ' + entry.toURL());
this.saveData = entry.toURL();
}, (error) => {
// handle error
console.log(error);
});