LocalModel.Builder

Stay organized with collections Save and categorize content based on your preferences.
public static class LocalModel.Builder extends Object

Public Constructor Summary

Public Method Summary

LocalModel
build()
Builds an instance of LocalModel with provided info.
LocalModel.Builder
setAbsoluteFilePath(String absoluteFilePath)
Sets the absolute file path of the local model file.
LocalModel.Builder
setAbsoluteManifestFilePath(String absoluteManifestFilePath)
Sets the absolute file path of the local model's manifest file.
LocalModel.Builder
setAssetFilePath(String assetFilePath)
Sets the asset subpath of the asset model file.
LocalModel.Builder
setAssetManifestFilePath(String assetManifestFilePath)
Sets the asset subpath of the asset model's manifest file.
LocalModel.Builder
setUri(Uri uri)
Sets the URI of the model file.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public LocalModel build ()

Builds an instance of LocalModel with provided info.

public LocalModel.Builder setAbsoluteFilePath (String absoluteFilePath)

Sets the absolute file path of the local model file.

public LocalModel.Builder setAbsoluteManifestFilePath (String absoluteManifestFilePath)

Sets the absolute file path of the local model's manifest file.

public LocalModel.Builder setAssetFilePath (String assetFilePath)

Sets the asset subpath of the asset model file.

Make sure your model asset file is not compressed by using aaptOptions. For more details, refer to documentation.

public LocalModel.Builder setAssetManifestFilePath (String assetManifestFilePath)

Sets the asset subpath of the asset model's manifest file.

Make sure your asset file is not compressed by using aaptOptions. For more details, refer to documentation.

public LocalModel.Builder setUri (Uri uri)

Sets the URI of the model file.

URI schemes can be content, android.resource or file. MlKitException with error code MlKitException.NOT_FOUND will be thrown when loading model if URI scheme is not one of 3 supported schemes.