AiPackLocation
public
abstract
class
AiPackLocation
extends Object
java.lang.Object | |
↳ | com.google.android.play.core.aipacks.AiPackLocation |
Location of an AI pack on the device.
A pack can be:
- either extracted into a folder on the device
- or installed as an APK
If the pack is stored as a folder, individual assets can be accessed as standard files on the filesystem.
If the pack is installed as an APK:
- common case: you can access assets via Android's AssetManager API
- advanced use-cases: you can use
AiPackManager.getAiAssetLocation(String, String)
, which returns the location of an asset inside the corresponding APK file
Summary
Public constructors | |
---|---|
AiPackLocation()
|
Public methods | |
---|---|
abstract
String
|
assetsPath()
Returns the file path to the folder containing the pack's assets, if the storage method is
|
abstract
int
|
packStorageMethod()
Returns whether the pack is installed as an APK or extracted into a folder on the filesystem. |
abstract
String
|
path()
Returns the file path to the folder containing the extracted AI pack, if the storage method is
|
Inherited methods | |
---|---|
Public constructors
AiPackLocation
public AiPackLocation ()
Public methods
assetsPath
public abstract String assetsPath ()
Returns the file path to the folder containing the pack's assets, if the storage method is
AiPackStorageMethod.STORAGE_FILES
.
The files found at this path should not be modified.
If the storage method is AiPackStorageMethod.APK_ASSETS
, this method will return
null
. To access assets from packs installed as APKs, use Asset Manager.
Returns | |
---|---|
String |
packStorageMethod
public abstract int packStorageMethod ()
Returns whether the pack is installed as an APK or extracted into a folder on the filesystem.
Returns | |
---|---|
int |
a value from AiPackStorageMethod
|
path
public abstract String path ()
Returns the file path to the folder containing the extracted AI pack, if the storage method is
AiPackStorageMethod.STORAGE_FILES
.
The files found at this path should not be modified.
If the storage method is AiPackStorageMethod.APK_ASSETS
, this method will return
null
. To access assets from packs installed as APKs, use Asset Manager.
Returns | |
---|---|
String |