AssetPackLocation
public
abstract
class
AssetPackLocation
extends Object
java.lang.Object | |
↳ | com.google.android.play.core.assetpacks.AssetPackLocation |
Location of an asset 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
AssetPackManager.getAssetLocation(String, String)
, which returns the location of an asset inside the corresponding APK file
Summary
Public constructors | |
---|---|
AssetPackLocation()
|
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 asset pack, if the storage method
is |
Inherited methods | |
---|---|
Public constructors
AssetPackLocation
public AssetPackLocation ()
Public methods
assetsPath
public abstract String assetsPath ()
Returns the file path to the folder containing the pack's assets, if the storage method is
AssetPackStorageMethod.STORAGE_FILES
.
The files found at this path should not be modified.
If the storage method is AssetPackStorageMethod.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 AssetPackStorageMethod
|
path
public abstract String path ()
Returns the file path to the folder containing the extracted asset pack, if the storage method
is AssetPackStorageMethod.STORAGE_FILES
.
The files found at this path should not be modified.
If the storage method is AssetPackStorageMethod.APK_ASSETS
, this method will return
null
. To access assets from packs installed as APKs, use Asset Manager.
Returns | |
---|---|
String |