AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas para móviles / Funciones de descarga
  • Properties specific to DownloadInfo variables
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The DownloadInfo type is used to read the different details about a download in progress retrieved by DownloadGetInfo. The characteristics of this download can be identified and modified using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Ejemplo
// Procedure to call at the end of the download
PROCEDURE DownloadCompleted(InfoDownload is DownloadInfo)
IF InfoDownload.Status = downloadStatusSuccessful THEN
    Info(InfoDownload.Title + " has been downloaded successfully."
    RETURN False
END


// ---------------
// Create a DownloadParameter variable 
// to store the download information
ParameterDownload is DownloadParameter

// Specify the parameters of the download
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
// Procedure to call at the end of the download
ParameterDownload.ProcedureEnd = "DownloadCompleted"

// The download is added to the list of downloads to be started
// (The download manager will start the download as soon as possible).
nID is int = DownloadAdd(ParameterDownload)

telInfo is DownloadInfo = DownloadGetInfo(nID)

Info(telInfo.Title)
Propiedades

Properties specific to DownloadInfo variables

The following properties can be used to get the details of a download:
Property nameType usedEffect
DescriptionCharacter stringDownload description displayed in the notification (if enabled).
DestinationURI variablePhysical address where the file will be stored.
FileSize8-byte integerFile size in bytes.
IdentifierIntegerIdentifier of the download in the download manager.
Progress8-byte integerNumber of bytes downloaded.
SourceURI variablehttp/https address of the file being downloaded.
StatusInteger constantDownload status:
  • downloadStatusFailed: Download failed. The StatusDetails property can be used to get more details.
  • downloadPendingStatus: Download pending.
  • downloadStatus: Download in progress.
  • downloadStatusPause: Download is paused. The StatusDetails property can be used to get more details.
  • downloadStatusSuccess: Download successful.
StatusDetailsIntegerStatus details.
If the Status property is set to downloadStatusFailed, the StatusDetails property can be used to get the RFC 2616 error code, if it was received.
Otherwise, it will correspond to one of the following constants:
  • downloadErrorInsufficientSpace: Storage space is insufficient.
  • downloadErrorExistingFile: The URI points to an existing file.
  • downloadErrorUnknown: The error is unknown.
  • downloadStorageError: Storage error.
  • downloadPauseWaitNewTest: The reason for the pause is a network error, the system is waiting before trying again.
  • downloadPauseWaitingForWifi: The reason for the pause is to wait for a WIFI network.
  • downloadPauseWaitNetwork: The reason for the pause is waiting for a network connection.
  • téléchargementPauseInconnu: The reason for the pause is unknown.
TitleCharacter stringDownload title displayed in the notification (if enabled).
Versión mínima requerida
  • Versión 27
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 20/09/2024

Señalar un error o enviar una sugerencia | Ayuda local