# Upgrading from V1 to V2

### Upgrading from V1 to V2 <a href="#upgradingfromv1tov2-upgradingfromv1tov2" id="upgradingfromv1tov2-upgradingfromv1tov2"></a>

#### 1. Add ALC library dependencies <a href="#upgradingfromv1tov2-1.addalclibrarydependencies" id="upgradingfromv1tov2-1.addalclibrarydependencies"></a>

Starting from ONE store SDK ALC v2, distribution is provided through maven.

To apply the SDK through maven, the following must be applied.

\


**Delete ALC AAR file**

Delete the alc-android-library\_v1.0.0.aar file in the libs folder of the Project

**Add maven dependencies**

Register the ONE store maven address in the project top-level build.gradle file.

{% hint style="warning" %}
For the Android Studio (version: bumblebee), add from settings.gradle.
{% endhint %}

```gradle

...
buildscript {
repositories {
...
    maven { url 'https://repo.onestore.net/repository/onestore-sdk-public' }
}
}
...

```

Add the ONE store ALC library dependency to the build.gradle file of the following app.

```gradle

...
dependencies {
def onestore_sdk_version = "2.0.0"
implementation "com.onestorecorp.sdk:sdk-licensing:$onestore_sdk_version"
}
...
```

\


**Add queries to AndroidManifest.xml**

Please refer to the ONE store notices for setting up the following two cases:

* [For Target SDK version set to 30 (OS11) or higher](https://dev.onestore.co.kr/devpoc/support/news/noticeView.omp?pageNo=4\&noticeId=32968\&viewPageNo=\&searchValue=)
* [For Target SDK version set to 31 (OS12) or higher](https://dev.onestore.co.kr/devpoc/support/news/noticeView.omp?pageNo=1\&noticeId=33072\&viewPageNo=\&searchValue=)

\


For Android 11 (Target SDK 30) or higher, the following must be added.

{% hint style="warning" %}
For Android 11 or higher (Target SDK 30 or higher), you must add queries.
{% endhint %}

```xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dev.sample">    
<queries>        
<intent>
            <action android:name="com.onestore.extern.licensing.LicensingService.ACTION" />
        </intent>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="onestore" />
        </intent>
    </queries>
...
```

\


#### 2. Add SDK Configuration <a href="#upgradingfromv1tov2-2.addsdkconfiguration" id="upgradingfromv1tov2-2.addsdkconfiguration"></a>

ALC v2 requires the sdk-configuration library to apply the required param for use in the SDK.&#x20;

To apply this, add the ONE store sdk-configuration library dependency to the build.gradle file.

```gradle

...
dependencies {
def onestore_configuration_version = "1.0.0"
implementation "com.onestorecorp.sdk:sdk-configuration-kr:$onestore_configuration_version"
}
...
```

\


\
