PhoneGap File Download Action Javascript

Description

The PhoneGap File Download Action Javascript allows you to download one or more files from a remote server (e.g. Amazon S3, the Alpha Anywhere server, or some other server) and store those files in a folder on your mobile device.

Discussion

Downloads files from a remote server and stores the files in the file system a mobile device.

When you select this action, the following dialog appears:

Your PhoneGap application must include the Device, File, File Transfer plugins.

Properties of note in this builder include:

  •  Files to download Javascript Function

    A Javascript function that returns an array of files that should be downloaded to the mobile device. You can specify fully qualified files (e.g. http://www.imageserver.com/images/image1.jpg) or relative filenames (e.g. images/image1.jpg). Relative filenames are fetched from the Alpha Anywhere server.

  •  Target folder

    The name of the folder on the mobile device where the files should be stored.

  •  On Download Complete

    Fires when all the files have been downloaded. NOTE: Not every file that was specified in the input array was necessarily successfully downloaded. Files are that are already in the target folder on the device will not be downloaded again. Your Javascript can reference an array with information about each file. See the help text for this property in the builder for more information.

See Also