Packagecom.tuarua.firebase.ml.common.modeldownload
Classpublic class ModelManager
InheritanceModelManager Inheritance Object

Manages models that are used by MLKit features.



Public Methods
 MethodDefined By
  
ModelManager
  
deleteDownloadedModel(model:CustomRemoteModel, listener:Function):void
Deletes the downloaded model from the device.
ModelManager
  
download(model:CustomRemoteModel, conditions:ModelDownloadConditions, listener:Function):void
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
Constructor Detail
ModelManager()Constructor
public function ModelManager()



Method Detail
deleteDownloadedModel()method
public function deleteDownloadedModel(model:CustomRemoteModel, listener:Function):void

Deletes 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):void

Downloads 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):void

Checks whether the given model has been downloaded.

Parameters

remoteModel:RemoteModel — The model to check the download status for.
 
listener:Function