Downloading additional content from my app from a web based server


John Clarke
I am planning to create a web based server that has additional content for my application.  It is likely that this content will be sent in either XML or JSON format.  How can I download content from the server and place it in a file on the device the app is on ?

DecSoft

Hello John,

Various things to consider here. The concept of "Download" is not something affordable for HTML apps. HTML apps can't download nor deal with the user's file system, which is reasonable, because, in other way, supose that an webpage can access to your file system... not very good, don't you?

If we have some JSON file in a server... we can just read it using an HttpClient control. If we want to save something in the client side, we can use cookies or the app's local storage, and we have actions to do this already included in App Builder like "SetOption" and "GetOption".

So we can't download files? If our app are compiled with Apache Cordova, yes, we can download files. We have actions like "FileWrite" and an specific action "FileDownload", that we can use. This actions relies in the File and File Transfer Apache Cordova plugins.

There are samples for all of these actions, so you can take a look at it, but, remember that these actions requires that our app must be compiled with Apache Cordova in order to properly work: in other words, that actions can't work in a browser without Apache Cordova.


John Clarke

Hi David,

               Thanks for your reply.  The app will be compiled using Apache Cordova.  What are the names of the sample apps that you mention ?

Best Wishes

John


DecSoft

Hello John,

You can search for "Files" in the samples dialog. You can see the "FileDownload" and the "Files" samples he first in the results.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.