# AiPackLocation

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

# AiPackLocation

`
public


abstract
class
AiPackLocation
`  
`

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.aipacks.AiPackLocation |

<br />

*** ** * ** ***

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

<br />

## Summary

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

|                                                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                                                 ||
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[assetsPath](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackLocation.html#assetsPath())`() ` Returns the file path to the folder containing the pack's assets, if the storage method is[AiPackStorageMethod.STORAGE_FILES](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStorageMethod.html#STORAGE_FILES). |
| ` abstract int`                                                                     | ` `[packStorageMethod](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackLocation.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/aipacks/AiPackLocation.html#path())`() ` Returns the file path to the folder containing the extracted AI pack, if the storage method is[AiPackStorageMethod.STORAGE_FILES](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStorageMethod.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

### AiPackLocation

```
public AiPackLocation ()
```

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

The files found at this path should not be modified.

If the storage method is[AiPackStorageMethod.APK_ASSETS](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStorageMethod.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[AiPackStorageMethod](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStorageMethod.html) <br /> |

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

The files found at this path should not be modified.

If the storage method is[AiPackStorageMethod.APK_ASSETS](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStorageMethod.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 /> |