CustomDownloader extension, developed by Riad Developer for MIT App Inventor. This documentation will guide you through each block’s functionality, parameters, and use cases with a clear and concise style.
The CustomDownloader extension provides powerful tools for managing file downloads within your MIT App Inventor projects. With this extension, you can start, pause, resume, and cancel downloads, as well as monitor progress and handle errors, all within your app.
Methods
1. CancelDownload
Description: Cancels an ongoing download. If the download is in progress, it will stop, and the partially downloaded file will be deleted.
-
Parameter:
-
downloadId
(number): The ID of the download to cancel.
-
2. DownloadFile
Description: Starts a file download from the specified URL. You can specify the file name and a custom file path. If the path is left empty, the file is saved to the default ‘Download’ folder.
-
Parameters:
-
URL
(text): The URL of the file to download. -
fileName
(text): The desired name for the downloaded file. -
customfilepath
(text): The custom path to save the file. Leave empty for default location.
-
3. GetDownloadedSize
Description: Returns the total size (in bytes) of the file being downloaded for a specific downloadId
.
-
Parameter:
-
downloadId
(number): The ID of the download.
-
- Returns: (number) The size of the file being downloaded.
4. PauseDownload
Description: Pauses the download associated with the provided downloadId
. To continue, use the ResumeDownload
method.
-
Parameter:
-
downloadId
(number): The ID of the download to pause.
-
5. ResumeDownload
Description: Resumes a paused download from where it left off.
-
Parameter:
-
downloadId
(number): The ID of the download to resume.
-
Events
1. DownloadProgress
Description: Triggered to report ongoing download progress. This event provides details like download speed, progress percentage, estimated time remaining (ETA), and more.
-
Parameters:
-
downloadId
(number): The ID of the download. -
progress
(text): The current progress percentage. -
speed
(text): The download speed. -
eta
(text): Estimated time remaining. -
fileSize
(text): Total size of the file being downloaded. -
downloadedSize
(number): The amount of data downloaded so far.
-
2. ErrorMessageShown
Description: Triggered when an error occurs during the download process. Provides an error message to help diagnose the issue.
-
Parameters:
-
downloadId
(number): The ID of the download. -
message
(text): The error message.
-
3. SuccessfulDownload
Description: Triggered when a download completes successfully. Provides details about the downloaded file, including its path and size.
-
Parameters:
-
downloadId
(number): The ID of the download. -
filePath
(text): The path where the file was saved. -
fileSize
(number): The size of the downloaded file. -
fileName
(text): The name of the downloaded file.
-
Properties
1. fileName
Description: Specifies the name of the file to be downloaded.
2. notificationMessage
Description: Sets the message for the notification displayed upon successful download completion.
3. notificationTitle
Description: Sets the title for the notification displayed when a download completes successfully.
Extension Size: 60.7 KB
Extension Version: 3.0
Click on the Download Now button and download it
If there is any problem you must replay I will surely reply to you