# SplitInstallHelper

Summary:[Methods](https://developer.android.com/reference/com/google/android/play/core/splitinstall/SplitInstallHelper#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/com/google/android/play/core/splitinstall/SplitInstallHelper#inhmethods)  

# SplitInstallHelper

`
public


class
SplitInstallHelper
`  
`

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.splitinstall.SplitInstallHelper |

<br />

*** ** * ** ***

Helper class that includes utilities that your app can use to retrieve information about available, installed split APKs.

For example, you use this API after a split install to refresh the app Context and[access code and resources from installed modules](https://d.android.com/guide/playcore/dynamic-delivery#access_installed_modules).

## Summary

|                                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                                          ||
|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static void` | ` `[loadLibrary](https://developer.android.com/reference/com/google/android/play/core/splitinstall/SplitInstallHelper.html#loadLibrary(android.content.Context,%20java.lang.String))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[String](https://developer.android.com/reference/java/lang/String.html)` libName) ` Loads a native library using a classloader, or a full path if the library is not available in the class path. |
| ` static void` | ` `[updateAppInfo](https://developer.android.com/reference/com/google/android/play/core/splitinstall/SplitInstallHelper.html#updateAppInfo(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) ` Updates application info based on currently installed splits.                                                                                                                                                    |

| ### 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 methods

### loadLibrary

```
public static void loadLibrary (Context context, 
                String libName)
```

Loads a native library using a classloader, or a full path if the library is not available in the class path. This method should be used by instant apps to load a library from a newly installed split.

Note: For instant apps, you need to call[updateAppInfo(Context)](https://developer.android.com/reference/com/google/android/play/core/splitinstall/SplitInstallHelper.html#updateAppInfo(android.content.Context)).

For more information and examples, see[Load C/C++ libraries](https://d.android.com/guide/playcore/dynamic-delivery#load_native_libs).

<br />

|                  Parameters                  ||
|-----------|-----------------------------------|
| `context` | `Context`: the app Context <br /> |
| `libName` | `String`: the library name <br /> |

|                                                          Throws                                                           ||
|-----------------------------------------------------------------------------------------------------|----------------------|
|                                                                                                     | UnsatisfiedLinkError |
| [UnsatisfiedLinkError](https://developer.android.com/reference/java/lang/UnsatisfiedLinkError.html) |                      |

**See also:**

- [System.loadLibrary(String)](https://developer.android.com/reference/java/lang/System.html#loadLibrary(java.lang.String))  

### updateAppInfo

```
public static void updateAppInfo (Context context)
```

Updates application info based on currently installed splits.

For instant apps on Android 8.0 (API level 26) and higher, you must call this API when a split is installed, so that app components can see code and resources from the new splits.

This method updates application info reference in application thread object.

You must call this API on Android 8.0 and 8.1. It's a no-op on all other versions, so it's safe to call.

For more information and examples, see[Access code and resources from installed modules](https://d.android.com/guide/playcore/dynamic-delivery#access_installed_modules).

<br />

|                    Parameters                    ||
|-----------|---------------------------------------|
| `context` | `Context`: application context <br /> |