# AssetPackLocation

Summary:[Ctors](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation#pubctors)\|[Methods](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation#inhmethods)  

# AssetPackLocation

`
public


abstract
class
AssetPackLocation
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|-----------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | com.google.android.play.core.assetpacks.AssetPackLocation |

<br />

*** ** * ** ***

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)](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackManager.html#getAssetLocation(java.lang.String,%20java.lang.String)), which returns the location of an asset inside the corresponding APK file

<br />

## Summary

|                                                                  ### Public constructors                                                                   ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[AssetPackLocation](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation.html#AssetPackLocation())`() ` |

|                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                         ||
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[assetsPath](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation.html#assetsPath())`() ` Returns the file path to the folder containing the pack's assets, if the storage method is[AssetPackStorageMethod.STORAGE_FILES](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#STORAGE_FILES). |
| ` abstract int`                                                                     | ` `[packStorageMethod](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation.html#packStorageMethod())`() ` Returns whether the pack is installed as an APK or extracted into a folder on the filesystem.                                                                                                                                                        |
| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[path](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackLocation.html#path())`() ` Returns the file path to the folder containing the extracted asset pack, if the storage method is[AssetPackStorageMethod.STORAGE_FILES](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#STORAGE_FILES).      |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public constructors

### AssetPackLocation

```
public AssetPackLocation ()
```

<br />

<br />

## 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](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#STORAGE_FILES).

The files found at this path should not be modified.

If the storage method is[AssetPackStorageMethod.APK_ASSETS](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#APK_ASSETS), this method will return`null`. To access assets from packs installed as APKs, use Asset Manager.

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

### packStorageMethod

```
public abstract int packStorageMethod ()
```

Returns whether the pack is installed as an APK or extracted into a folder on the filesystem.

<br />

|                                                                                Returns                                                                                ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a value from[AssetPackStorageMethod](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html) <br /> |

### 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](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#STORAGE_FILES).

The files found at this path should not be modified.

If the storage method is[AssetPackStorageMethod.APK_ASSETS](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#APK_ASSETS), this method will return`null`. To access assets from packs installed as APKs, use Asset Manager.

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |