> 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/cht/tools/alc/sheng-ji-zhi-alc-v2.md).

# 升級至ALC V2

## 由V1升級至 V2 <a href="#id-sheng-ji-dao-alcv2-you-v1-sheng-ji-dao-v2" id="id-sheng-ji-dao-alcv2-you-v1-sheng-ji-dao-v2"></a>

### 新增ALC Library附屬項目 <a href="#id-sheng-ji-dao-alcv21.-tian-jia-alclibrary-cong-shu-xiang-mu" id="id-sheng-ji-dao-alcv21.-tian-jia-alclibrary-cong-shu-xiang-mu"></a>

從ONE store SDK ALC v2 開始，透過 maven 發布。\
透過maven套用SDK，需要套用以下內容。

<br>

#### **删除ALC AAR 文件**

删除Project内 libs 資料夾中 alc-android-library\_v1.0.0.aar檔案

#### **新增Maven附屬性**

選項頂端的 build.gradle 資料夾中，註冊ONE store maven 地址。

{% hint style="warning" %}
Android Studio (version: bumblebee)，在settings.gradle新增
{% endhint %}

```gradle

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

<br>

下面應用程式的 build.gradle 檔案中，新增 ONE store ALC Library附屬項目&#x20;

```gradle

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

<br>

#### **AndroidManifest.xml中新增queries**&#x20;

以下兩種情況，請參考ONE store 公告進行設定。

* [Target SDK 版本設定為 30(OS 11) 以上](https://dev.onestore.co.kr/devpoc/support/news/noticeView.omp?pageNo=4\&noticeId=32968\&viewPageNo=\&searchValue=)
* [Target SDK 版本設定為 31(OS 12) 以上](https://dev.onestore.co.kr/devpoc/support/news/noticeView.omp?pageNo=1\&noticeId=33072\&viewPageNo=\&searchValue=)

<br>

Android 11 (Target SDK 30) 以上，請新增以下内容

{% hint style="warning" %}
Android 11 以上 (Target SDK 30 以上)，請新增 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>
...
```

<br>

### 新增SDK Configuration  <a href="#id-sheng-ji-dao-alcv22.-tian-jia-sdkconfiguration" id="id-sheng-ji-dao-alcv22.-tian-jia-sdkconfiguration"></a>

在ALC v2中，為使用SDK所需的必要param，必須先套用sdk-configuration Library.\
為套用此功能，請於 build.gradle檔案中新增ONE store sdk-configuration Library附屬項目。

```gradle

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


---

# 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/cht/tools/alc/sheng-ji-zhi-alc-v2.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.
