> For the complete documentation index, see [llms.txt](https://onestore-dev.gitbook.io/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onestore-dev.gitbook.io/dev/eng/tools/billing/v21/unitymig.md).

# Upgrading to IAP SDK V21 from Unity

### Updating library files to support Android OS from v19 <a href="#upgradingtoiapsdkv21fromunity-updatinglibraryfilestosupportandroidosfromv19" id="upgradingtoiapsdkv21fromunity-updatinglibraryfilestosupportandroidosfromv19"></a>

\
However, if only the library files are replaced, new functions provided in IAP SDK v2, such as multiple purchases and subscriptions, may be unavailable.

#### Delete the v19 library files. <a href="#upgradingtoiapsdkv21fromunity-deletethev19libraryfiles." id="upgradingtoiapsdkv21fromunity-deletethev19libraryfiles."></a>

<br>

| **Assets > Plugins > Android** | <ul><li>iap\_sdk-v19.00.xx.aar</li><li>iap\_adapter-v1.x.x.aar</li></ul> |
| ------------------------------ | ------------------------------------------------------------------------ |
| **Assets > StreamingAssets**   | <ul><li>global-appstores.json</li></ul>                                  |

<br>

#### Remove elements from AndroidManifest.xml <a href="#upgradingtoiapsdkv21fromunity-removeelementsfromandroidmanifest.xml" id="upgradingtoiapsdkv21fromunity-removeelementsfromandroidmanifest.xml"></a>

Assets > Plugins > Android > AndroidManifest.xml\
Remove ProxyActivity and iap\_version metadata.

```xml

<manifest>
<application>
        <activity android:name="com.gaa.sdk.iap.ProxyActivity"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|layoutDirection|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>

         <meta-data android:name="iap:api_version" android:value="6"/>
...
</application>
</manifest>

```

#### [Add the v21 library files. ](https://github.com/ONE-store/unity_plugins/tree/archive) <a href="#upgradingtoiapsdkv21fromunity-addthev21libraryfiles." id="upgradingtoiapsdkv21fromunity-addthev21libraryfiles."></a>

Add the library files to the folder below.

| **Assets > Plugins > Android** | <ul><li>sdk-base-v1.0.0.aar</li><li>sdk-auth-v1.0.1.aar</li><li>sdk-iap-v21.00.00.aar</li><li>sdk-configuration-kr-v1.0.0.aar</li><li>iap-unity-adapter-v2.0.0.aar</li></ul> |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

<br>

***

### Upgrade to use the new features of IAP SDK v21 <a href="#upgradingtoiapsdkv21fromunity-upgradetousethenewfeaturesofiapsdkv21" id="upgradingtoiapsdkv21fromunity-upgradetousethenewfeaturesofiapsdkv21"></a>

<br>

#### Delete the files added from v19 ".unitypackage" <a href="#upgradingtoiapsdkv21fromunity-deletethefilesaddedfromv19-.unitypackage" id="upgradingtoiapsdkv21fromunity-deletethefilesaddedfromv19-.unitypackage"></a>

<br>

| **Assets > Plugins > Android**  | <ul><li>iap\_sdk-v19.00.xx.aar</li><li>iap\_adapter-v1.x.x.aar</li></ul>                                                                                           |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Assets > Scripts > Purchase** | <ul><li>GaaIapCallManager.cs</li><li>GaaIapCallbackManager.cs</li><li>GaaIapResultListener.cs</li><li>GaaIapPurchaseResponse.cs</li><li>AndroidNative.cs</li></ul> |
| **Assets > StreamingAssets**    | <ul><li>global-appstores.json</li></ul>                                                                                                                            |

<br>

#### Remove elements from AndroidManifest.xml <a href="#upgradingtoiapsdkv21fromunity-removeelementsfromandroidmanifest.xml.1" id="upgradingtoiapsdkv21fromunity-removeelementsfromandroidmanifest.xml.1"></a>

Assets > Plugins > Android > AndroidManifest.xml\
Remove ProxyActivity and iap\_version metadata.

```xml

<manifest>
<application>
        <activity android:name="com.gaa.sdk.iap.ProxyActivity"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|layoutDirection|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>

       <meta-data android:name="iap:api_version" android:value="6"/>
...
</application>
</manifest>

```

#### Remove GameObject <a href="#upgradingtoiapsdkv21fromunity-removegameobject" id="upgradingtoiapsdkv21fromunity-removegameobject"></a>

Remove the GaaIapCallbackManager GameObject.\
In Unity Plugin with v21 applied, you no longer need to manually add GameObjects.\
\
If you have done all of the above, you are ready to apply the IAP SDK v21.\
Now, you can apply by referring to the guide for [Using ONE store IAP from Unity.](/dev/eng/tools/billing/v21/unity.md)

<figure><img src="/files/SbUTm5sju7OFFdnHez5x" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://onestore-dev.gitbook.io/dev/eng/tools/billing/v21/unitymig.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
