Issue when using the Download activity on Native Mobile

0
Hello,   I'm facing an issue and maybe you can help me: In my Native Mobile app, I have a listview configured to get data from database. It retrieves a List of Documents (derived from System.FileDocument) Then, inside the listview, besides the item (file to download), there's a download button that calls a nanoflow which receives the Document as parameter, and finally calls a Download activity with this Document. Unfortunatelly this raises an error: null is not an object (evaluating 'f.DocumentDir')   I've tried also with the sample project provided by Aiden https://marketplace.mendix.com/link/component/114253 In this sample project, the sync ensure that the Document is on the device. The "View Document" works fine, but the user demands  download the file to the Download folder of the device. So I've tried to call the Download activity also in this example. Sadly the same error occurs. In the logcat, I have the messages:   2023-07-31 10:27:49.321 3660-8813/myapp.nativefiledocumentsdemo2.developerapp E/unknown:ReactNative: Error: Requiring module "1098", which threw an exception: TypeError: null is not an object (evaluating 'f.DocumentDir') Nanoflows running: Nanoflow 1: TestNativeFileDocuments.ACT_DownloadFile Stack: "Call JavaScript Action" in nanoflow "TestNativeFileDocuments.ACT_DownloadFile" Current page: TestNativeFileDocuments.Document_Overview_All   So, to reproduce this error:   1) Download the sample project: https://marketplace.mendix.com/link/component/114253 2) Build a Custom Developer App to be able to launch the app 3) Go to View/pick document and change the behavior to use Download File instead of View File on the listview 4) See the bugIs there any alternative to copy the Document to the Downloads folder of the device, since the Document is already on the device, but inside its local database?   The sample project also have a Download Activity, however, it requires a link to a file using the https:// protocol. I've tried to copy the file from the local database to a temp folder inside the secure area of the Application, and then use this alternative Download Activity, but it complains that the protocol file:// is not acceptable...Do you have any suggestions to solve this issue?  
asked
1 answers
0

A way to solve this issue is to use the copy file action in the NativeFileDocuments module, as shown below

 

 

The issue on the Download  activity from NativeMobileResources module still exists, and it's related to the "react-native-blob-util" JS library.

Tried to update to  version 0.18.6, no success...

 

answered