StringDownloader

abstract class StringDownloader : Downloader

Constructors

Link copied to clipboard
constructor(okHttpClient: OkHttpClient)

Properties

Link copied to clipboard
Link copied to clipboard
open var url: String

Functions

Link copied to clipboard
open fun cancel()
Link copied to clipboard
open fun invalidate()
Link copied to clipboard
open fun isDataLoaded(): Boolean
Link copied to clipboard
open fun isFromCache(): Boolean
Link copied to clipboard
open fun isLoading(): Boolean
Link copied to clipboard
open fun loadAsync()
open fun loadAsync(callback: Downloader.Callback)
Downloads the specified endpoint by setPath as a string and calls onResponse on success.
Link copied to clipboard
open fun setBundledData(context: Application, assetPath: String, rawResId: Int, storageFile: File)
Use bundled data that are located in the assets folder, paths are relative.
Link copied to clipboard
open fun setInMemoryCacheTime(seconds: Int)
When set to a value higher than 0, it uses this time in seconds as cache time.
Link copied to clipboard
open fun setRetryCount(retryCount: Int)
Sets the number of times a download should be retried on failure.
Link copied to clipboard
open fun setStorageFile(storageFile: File)
Link copied to clipboard
open fun updateStorage(content: String)
Updates the bundled data that was used in setBundledData.