[Now Plugin File Manager] backgroundDownload undefined

[Now Plugin File Manager] backgroundDownload undefined

  
Forge Component
(0)
Published on 22 Apr by Vitor Oliveira
0 votes
Published on 22 Apr by Vitor Oliveira
Hi Mobile Experts,

we are trying to implement the webblock DownloadFile but is encountering problem with backgroundDownload  property.

the exact error in console is " Uncaught TypeError: Cannot read property 'backgroundDownload' of undefined"
, and when navigating through DownloadFile.js, the line which contain the error is this line "cordova.plugins.backgroundDownload.backgroundDownload(url, targetFile, Success, Fail, Progress); " inside function MuxMobile_DownloadFile(RuntimeId, url, targetFile, fileName).

double checked config.xml and backgroundDownload plugin is listed, also checked using cordova CLI and it showed that backgroundDownload is installed in the package.  

No Idea why project still does not detect cordova plugin backgrounddownload

Regards,
Lawrence
Hi Lawrence,

In order to use this functionality, you need to customize OutSystems Now and add that cordova plugin.
You can see in this post that has a video, how to do it to iOS.

Let me know if this helps you.
Cheers,
RG
Hi Rúben,

we are doing it using Outsystems Now v1.1.12 in android (sent some screenshots).  The plugin is correctly installed in the Project Folder using Cordova CLI.  Not sure why the property of backgrounddownload is still missing after cordova plugin add command.

thanks
lawrence

Cordova Plugins in the Prject folder
 
Error Log

Hi Lawrence,

I tested from our side and aparently this is a issue on the 
DownloadFile webblock. We will working on it and let you know as soon as possible.

Thanks,
Vitor

Hi Lawrence, 

It was released a new version of File Manager in forge that should resolve your problem.


Let me know if this helps you.

Thanks,
Vitor

Hi Vitor,

thanks for the fix!

hope you could also assist in new error message in the DownloadFile.js under function fail(message).  in the webblock of DownloadFile, I left the TargetFile blank (""), how should i point the targetfile in Android/iOS to the external storage?

thanks!
lawrence


Hi Lawrence,

You can use the File Plugin, that is already installed with OutSystems Now, to get the File Path that you will use in the target file input.

Thanks,
Vitor