|
|
|
|
|
DownloadAdd (Function) In french: TéléchargementAjoute Adds a new download in the device's download manager. The download will run in the background as soon as the download manager is ready to execute it. Note: Download functions have no effect in the simulator.
PROCEDURE DownloadCompleted(InfoDownload is DownloadInfo)
IF InfoDownload.Status = downloadStatusSuccessful THEN
Info(InfoDownload.Title + " has been downloaded successfully."
RETURN False
END
ParameterDownload is DownloadParameter
ParameterDownload.Source = ...
"https://windev.com/storage/en_US/img/visual/25/logo-pcsoft.png"
ParameterDownload.Title = "PC Soft Logo"
ParameterDownload.Description = "PC Soft company logo"
ParameterDownload.Destination = SysDirExternalStorage(1, sseAppDownload)
ParameterDownload.MobileNetworkAllowed = True
ParameterDownload.MeteredNetworkAllowed = False
ParameterDownload.RequiresCharging = True
ParameterDownload.NotificationMode = downloadNotifProgressAndCompletion
ParameterDownload.ProcedureEnd = "DownloadCompleted"
nID is int = DownloadAdd(ParameterDownload)
telInfo is DownloadInfo = DownloadGetInfo(nID)
Info(telInfo.Title)
Syntax
<Result> = DownloadAdd(<Download>)
<Result>: Integer - Identifier of the new download,
- -1 if an error occurred.
<Download>: DownloadParameter variable Name of the DownloadParameter variable that corresponds to the download to be started. Only the Source property of the DownloadParameter variable is needed to start the download. Remarks Required permissions This function changes the permissions required by the application. Permission required: INTERNET This permission allows the applications to open the network sockets.
Related Examples:
|
Android (WINDEV Mobile): Android Downloads
[ + ] This example illustrates background downloads in WINDEV Mobile and Android. It is no longer necessary to keep the application open to propose the download of a file. The download manager allows you to download large files and to notify the application when the downloads are finished.
|
Component: wd300android.aar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|