[Transfer] - Download file in specific directory?

Hi, i’m using Transfer to download PDF file in my app.

My code is:

fileTransfer.download(url, cordova.file.dataDirectory + 'Diagram.pdf').then((entry)...

It works me ok, but the file is always saving at </Android/data/app-id/files>, I’m trying to save the file in my Internal Storage, specically in /Download directory.

Is there any way to do that?

And another question, how can I use ‘onProgress’ function to create Local Notification with a progress download bar? (Downloading: 0%-100%)


have you got any solution?

Use cordova.file.externalDataDirectory+ + ‘Diagram.pdf’ instead of cordova.file.dataDirectory + 'Diagram.pdf’
fileTransfer.download(url, cordova.file.externalDataDirectory+ ‘Diagram.pdf’).then((entry)…

This will save the file in your android > package > files > file.pdf
I am trying to save the image in a custom directory but still did not find the solution.

hope this help for now.