ResourceDownloader

class ResourceDownloader(val requestTimeout: RequestTimeout = RequestTimeout.DEFAULT)

A utility class responsible for downloading missing resource files from a remote server.

This class uses an OkHttpClient to perform network requests and downloads resources specified by a list of ResourceCheckResult. It then checks the integrity of the downloaded files and returns a list of ResourceCheckResult representing the files that failed the check.

Constructors

Link copied to clipboard
constructor(requestTimeout: RequestTimeout = RequestTimeout.DEFAULT)

Properties

Link copied to clipboard

The timeout settings to use for the network requests. Defaults to RequestTimeout.DEFAULT.

Functions

Link copied to clipboard
suspend fun downloadResources(missingResources: List<ResourceCheckResult>, context: Context, resFolder: String, downloadUrl: String): List<ResourceCheckResult>

Downloads a list of missing resource files from the specified URL and verifies their integrity.