[File Plugin] How to download a file into the 'download folder' of an Android device?
file-plugin
Mobile icon
Forge component by Platform Maintenance
Application Type
Mobile
Service Studio Version
11.14.5 (Build 57418)
Platform Version
11.14.0 (Build 33133)

Hello all!

For some months I've been trying to save files into the Download Folder of the Internal Shared Storage of an Android mobile device, but still haven't manage to succeed, even after applying some suggestions from other forum posts from here.

Righ now I've been trying with a customized file plugin, where in the JavaScript of the action "RequestDirectoryFromFileSystem" I put fileSystemType = cordova.file.externalRootDirectory + "/Download/"; and instead of saving in the "Download Folder", it just saves in the "Internal Shared Storage".
(For more details please check image below and the attached oml. from my example application)


So I'm here to ask if anyone knows a way to save a file into the Download Folder of the device, with the current File Plugin in forge, or, with a customized version of that plugin?


Please let me know if anyone has over past this issue, thanks in advance!



oml.zip

Hello Mafalda Rosa ,

FYI. May be its a bit late, I also have same problem like you. So I tried your solution.

I give the "/Download" in SaveFile path and remove the "/Download/" from Javascript. Then it saves to InternalStorage->Download. Tested in Android 11. 



Hope it helps. 

Thank you so much.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.