Not able to download file on Android 10 in ionic 3

Not able to download file and error message shows on Android 10 in app built with ionic 3 and in Android 11, download complete alert message shows but can’t find the file in download folder.
Though below android 10, it works perfectly.

Hard to say much definitively without knowing exactly what libraries you are using to do all this work, but I suspect @jcesarmobile’s comment in here is likely relevant to your situation.

Here is My code:::

const fileTransfer: FileTransferObject = this.filetransfer.create();
fileTransfer.download(fileUrl, this.file.externalRootDirectory+ “/Download/”+ fileName, true).then((entry) => {
console.log(entry.toURL())
const toast = this.toastCtrl.create({
message: ‘Download complete’ +entry.toURL(),
duration: 5000
});
toast.present();
}, (error) => {
const toast = this.toastCtrl.create({
message: ‘error downloading file.’ + JSON.parse(error),
duration: 3000
});
toast.present();
});

ionic info versions:::

Ionic CLI : 5.4.16
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 26 other plugins)

Utility:

cordova-res : 0.15.3
native-run : 1.3.0

System:

Android SDK Tools : 26.1.1
NodeJS : v14.16.0
npm : 6.14.11
OS : Windows 10

Plugin Version::

@ionic-native/file-path”: “^4.20.0”,
@ionic-native/file-transfer”: “^4.20.0”,
@ionic-native/file”: “^4.20.0”,

“cordova-plugin-filepath”: “^1.1.0”,
“cordova-plugin-file”: “^6.0.2”,
“cordova-plugin-file-transfer”: “^1.7.1”,


This image for issue in android 10

Android 11 Storage FAQ.

It happens the same to me when trying to save a base64 to the device using ionic 5, cordova and base64ToGallery plugin on Android 10 and 11. Same come works fine for Android 9 and below and iOS. Could you solve it?

Hi, aside from the doc, do you have the code with the solution? I read lots of documentations but can’t find the way to solve it.

Yes, I read that documentation but which would be the Ionic/cordova plugin that I can use to store a file or base64 in the device?