Manages remote models.
Before using a remote model, download it with
This class is thread safe.
Public Method Summary
|<T extends RemoteModel> Task<Set<T>>
|synchronized static RemoteModelManager
Inherited Method Summary
public Task<Void> deleteDownloadedModel (RemoteModel remoteModel)
Deletes the given
remoteModel from disk. Does nothing if the model is
public Task<Void> download (RemoteModel remoteModel, DownloadConditions downloadConditions)
Initiates the download of
remoteModel if the download hasn't begun.
If the model's download is already in progress, the current download task will be returned.
If the model is already downloaded to the device, and there is no update, the task will immediately succeed.
If the model is already downloaded to the device, and there is update, a download for the updated version will be attempted.
If the model downloaded failed, the returned
Downloads for each type of model may encounter different
Please check detailed documentation of each RemoteModel class for possible
- the task for the
Returns the set of all currently downloaded models of the given