English
Search
K

Upgrading to IAP SDK V21 from Unity

Updating library files to support Android OS from v19

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.

Assets > Plugins > Android
  • iap_sdk-v19.00.xx.aar
  • iap_adapter-v1.x.x.aar
Assets > StreamingAssets
  • global-appstores.json

Remove elements from AndroidManifest.xml

Assets > Plugins > Android > AndroidManifest.xml Remove ProxyActivity and iap_version metadata.
<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 library files to the folder below.
Assets > Plugins > Android
  • sdk-base-v1.0.0.aar
  • sdk-auth-v1.0.1.aar
  • sdk-iap-v21.00.00.aar
  • sdk-configuration-kr-v1.0.0.aar
  • iap-unity-adapter-v2.0.0.aar

Upgrade to use the new features of IAP SDK v21

Delete the files added from v19 ".unitypackage"

Assets > Plugins > Android
  • iap_sdk-v19.00.xx.aar
  • iap_adapter-v1.x.x.aar
Assets > Scripts > Purchase
  • GaaIapCallManager.cs
  • GaaIapCallbackManager.cs
  • GaaIapResultListener.cs
  • GaaIapPurchaseResponse.cs
  • AndroidNative.cs
Assets > StreamingAssets
  • global-appstores.json

Remove elements from AndroidManifest.xml

Assets > Plugins > Android > AndroidManifest.xml Remove ProxyActivity and iap_version metadata.
<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

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.
Last modified 9mo ago