| Package | com.tuarua.firebase.ml.common.modeldownload |
| Class | public class ModelManager |
| Inheritance | ModelManager Object |
| Method | Defined By | ||
|---|---|---|---|
| ModelManager | |||
deleteDownloadedModel(model:CustomRemoteModel, listener:Function):void
Deletes the downloaded model from the device. | ModelManager | ||
Downloads the given model from the server to a local directory on the device. | ModelManager | ||
isModelDownloaded(remoteModel:RemoteModel, listener:Function):void Checks whether the given model has been downloaded. | ModelManager | ||
| ModelManager | () | Constructor |
public function ModelManager()| deleteDownloadedModel | () | method |
public function deleteDownloadedModel(model:CustomRemoteModel, listener:Function):voidDeletes the downloaded model from the device.
Parameters
model:CustomRemoteModel — The downloaded model to delete.
| |
listener:Function |
| download | () | method |
public function download(model:CustomRemoteModel, conditions:ModelDownloadConditions, listener:Function):voidDownloads the given model from the server to a local directory on the device. Use
isModelDownloaded()to check the download status for the model. If this method is invoked and the model has already been downloaded, a request is made to check if a newer version of the model is available for download. If available, the new version of the model is downloaded.
Parameters
model:CustomRemoteModel — The model to download.
| |
conditions:ModelDownloadConditions — The conditions for downloading the model.
| |
listener:Function |
| isModelDownloaded | () | method |
public function isModelDownloaded(remoteModel:RemoteModel, listener:Function):voidChecks whether the given model has been downloaded.
Parameters
remoteModel:RemoteModel — The model to check the download status for.
| |
listener:Function |