Skip to content

Download

Non-Visible component
Category Requires Version
Connectivity API 21, Android 5.0 Lollipop 2

Overview

The Download component is a non-visible component that allows users to download any file to the device

Permissions

Events

Download Complete

Event to detect if the download is successful finished. You can use the "filePath" to use the downloaded file into your app. The "fileSize" will be returned in bytes.

whenDownload.Download Complete file Path file Name file Size do
Params
file Path Text
file Name Text
file Size Number

Got File Size

Event to detect file size is ready to be used.

whenDownload.Got File Size size do
Params
size Number

Notification Clicked

Event to detect when the user clicks on a running download, either from a system notification or from the downloads UI.

whenDownload.Notification Clickeddo

On Download Progress Changed

Get the progress (in percentage) of the current download task.

whenDownload.On Download Progress Changed progress do
Params
progress Number

Methods

Download

Start the download of the given download url.

callDownload.Download

Get File Size

Get the file size (in bytes) of a file that is stored online or on your device. The block detect automatic if it is a online path or not. You will get the result in the "Got File Size" event.

callDownload.Get File Sizepath
Params
path Text

Show Download

You can open the download folder with this block.

callDownload.Show Download

Properties

Allow Over Roaming

Boolean Default: False ➖ Read Write - Designer Blocks

Set whether this download may proceed over a roaming connection.

Download.Allow Over Roaming
setDownload.Allow Over Roaming to 

Description

Text Default: Downloading file.. ➖ Read Write - Designer Blocks

Set the description that you will see in the download notification.

Download.Description
setDownload.Description to 

Download URL

Text ➖ Read Write - Designer Blocks

Set here the url to the file that you want to download.

Download.Download URL
setDownload.Download URL to 

Is Download Manager Available

⚠ Deprecated

Boolean ➖ Read - Blocks

This function is deprecated. Do not use it anymore. We will remove it in the future. Since we support min API 14 the download manager is by default available. The download manager was added in API 9.

Download.Is Download Manager Available

Require Charging

Boolean Default: False ➖ Read Write - Designer Blocks

Specify that to run this download, the device needs to be plugged in. Works only for devices with api >= 24.

Download.Require Charging
setDownload.Require Charging to 

Require Device Idle

Boolean Default: False ➖ Read Write - Designer Blocks

Specify that to run, the download needs the device to be in idle mode. Idle mode is a loose definition provided by the system, which means that the device is not in use, and has not been in use for some time. Works only for devices with api >= 24.

Download.Require Device Idle
setDownload.Require Device Idle to 

Save File As

Text Default: NewFile.png ➖ Read Write - Designer Blocks

Set here the new filename for the file that you want to download.

Download.Save File As
setDownload.Save File As to 

Scan By Media Scanner

Boolean Default: True ➖ Read Write - Designer Blocks

If the file to be downloaded is to be scanned by MediaScanner.

Download.Scan By Media Scanner
setDownload.Scan By Media Scanner to 

Show Notification

Boolean Default: True ➖ Read Write - Designer Blocks

Control whether a system notification is posted by the download manager while this download is running or when it is completed.

Download.Show Notification
setDownload.Show Notification to 

Suppress Warnings

Boolean Default: True ➖ Read Write - Designer Blocks

If false you will see a toast message with a error message when a error is occurred.

Download.Suppress Warnings
setDownload.Suppress Warnings to 

Title

Text Default: Download.. ➖ Read Write - Designer Blocks

Set the title that you will see in the download notification.

Download.Title
setDownload.Title to