FirebaseTranslateModelManager

public class FirebaseTranslateModelManager extends FirebaseModelManager

Manages downloaded language models for translation.

Inherited Field Summary

Public Method Summary

Task<Void>
deleteDownloadedModel(FirebaseTranslateRemoteModel remoteModel)
Deletes the specified downloaded language model from disk.
Task<Void>
Task<Set<FirebaseTranslateRemoteModel>>
getAvailableModels(FirebaseApp app)
Returns the set of all currently available language models (including built-in models, currently just English).
static FirebaseTranslateModelManager
getInstance()
Gets an instance of a FirebaseTranslateModelManager corresponding to the default FirebaseApp instance.
FirebaseLocalModel
FirebaseRemoteModel
getNonBaseRemoteModel(String modelNameForBackend)
boolean
boolean

Inherited Method Summary

Public Methods

public Task<Void> deleteDownloadedModel (FirebaseTranslateRemoteModel remoteModel)

Deletes the specified downloaded language model from disk. Does nothing if the language model is not available or built-in (currently just English).

public Task<Void> downloadRemoteModelIfNeeded (FirebaseRemoteModel remoteModel)

public Task<Set<FirebaseTranslateRemoteModel>> getAvailableModels (FirebaseApp app)

Returns the set of all currently available language models (including built-in models, currently just English).

public static FirebaseTranslateModelManager getInstance ()

Gets an instance of a FirebaseTranslateModelManager corresponding to the default FirebaseApp instance.

public FirebaseLocalModel getLocalModel (String modelName)

public FirebaseRemoteModel getNonBaseRemoteModel (String modelNameForBackend)

public boolean registerLocalModel (FirebaseLocalModel localModel)

public boolean registerRemoteModel (FirebaseRemoteModel remoteModel)