# ALC Developer Guide

**ALC概要**

* ONE store提供许可证服务(Application License Checker)为软件执行许可证政策。通过ALC服务，可以实时确认使用软件的用户是否拥有有效的许可证，然后适当地判断是否追加使用。ONE store ALC以网络为基础提供服务，向ONE store服务器询问并判断当前用户是否拥有有效的许可证。软件向智能手机安装的“ONE store service”发送询问请求，而“ONE store service”则向“ONE store”智能手机发送请求，并接收结果。

<figure><img src="https://content.gitbook.com/content/G1QmZshNU0saLqpjlDho/blobs/PMhvj3qhQggfrWIMEYUQ/image.png" alt=""><figcaption></figcaption></figure>

*

```
ALC Library
```

```
ONE store为用户提供可下载的Library，使用户轻松地在软件上确认许可证。Library将承担所有软件在ONE store service和ONE store服务器通讯所需的所有功能，软件只需利用Library提供的api来确认用户的许可证是否有效。

* #### **设置开发及测试环境** <a href="#applicationlicensecheckeralc-shuo-ming-she-zhi-kai-fa-ji-ce-shi-huan-jing" id="applicationlicensecheckeralc-shuo-ming-she-zhi-kai-fa-ji-ce-shi-huan-jing"></a>
  * 建议的开发环境 : 软件应用ALC Library，需如下开发环境：
  * Android 5.0以上版本(API版本需21以上)
  * Java SDK 1.6 版本
  * Android studio 3.0 以上版本<br>
    * ### **设置** <a href="#applicationlicensecheckeralc-shuo-ming-she-zhi" id="applicationlicensecheckeralc-shuo-ming-she-zhi"></a>
      * 在Apps >“商品注册”里输入要注册的App商品和包名。
```

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2F0f82WJ6lw1tp6BIqfINH%2Fimage.png?alt=media&#x26;token=bd6b4aef-1945-4a43-a244-d77a63aeac7e" alt=""><figcaption></figcaption></figure>

* 选择注册的App后，在“商品现状”>“许可证管理”菜单里确认许可证密钥。许可证密钥是使用ALC Library的所必备条件。

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FItMZOgZY2eIAqKE76yjj%2Fimage.png?alt=media&#x26;token=7634e8fe-5c2c-499a-8184-6f1944ff0556" alt=""><figcaption></figcaption></figure>

* 根据 ALC Library 应用指南开发软件。ALC Library 应用指南请参考[这里](http://172.21.139.64:8090/wiki/en/pages/viewpage.action?pageId=38077708)。用户可以在销售软件前确认其是否应用许可证。可以在"许可证管理"菜单下的"ALC测试管理"里注册测试员。完成注册测试员后，无论是否购买该软件 都将被处理为测试员对该软件拥有正常的许可证，而删除测试员时，许可证也将被删除。
*

```
<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FfJ0zj6mnaNvENBjbHQ3j%2Fimage.png?alt=media&#x26;token=875d6d88-fd20-4188-8b12-4ba57cc2cb5d" alt=""><figcaption></figcaption></figure>
```

* 使用Test ID查询要使用的Test ID（ONE store用户账号）\
  \* 请将ONE store的帐号注册为测试帐号（可使用的ID类型：ONE store，Naver，facebook，google ID)
* 确认已查询的测试ID后，点击“注册”按钮，注册成为测试员。注册成功的测试员可以在测试ID管理进行删除。
* 为了销售App，用户可以上传APK，并检查是否应用ALC。
  * 应用ALC时：显示Library内api版本（ex. 1）
    * 未应用ALC时：显示为未应用
* \
  \ <br>

  <figure><img src="https://content.gitbook.com/content/G1QmZshNU0saLqpjlDho/blobs/HFUdkgXCeJwQxJWOZ20p/image.png" alt=""><figcaption></figcaption></figure>
*
* #### **应用前注意事项** <a href="#applicationlicensecheckeralc-shuo-ming-ying-yong-qian-zhu-yi-shi-xiang" id="applicationlicensecheckeralc-shuo-ming-ying-yong-qian-zhu-yi-shi-xiang"></a>
  * A应用ALC SDK前，请确认以下内容。
    * 由于ALC是基于网络的服务，确认许可证时需要处于联网状态。而未连接网络时，用户可以使用许可证缓存进行操作。
    * ALC测试员注册只适用于单个软件。要在不同的软件中进行ALC测试时，需要在相关App商品的“许可证管理”菜单里重新注册测试员。
    * ALC测试环境与进行In-App测试的Sandbox无关。
    * “ONE store service”必须已经安装在用户设备中。通信公司销售的智能手机基本上都内置“ONE store service”，但在针对境外市场的智能手机及平板里没有内置，因此必须通过以下链接下载最新版本。[下载](http://m.onestore.co.kr/mobilepoc/etc/downloadGuide.omp?PrePageNm=/main)
* ### **ALC Library应用指南** <a href="#applicationlicensecheckeralc-shuo-ming-alclibrary-ying-yong-zhi-nan" id="applicationlicensecheckeralc-shuo-ming-alclibrary-ying-yong-zhi-nan"></a>
  * [ALC(Application License Checker) V2 应用](https://onestore-dev.gitbook.io/dev/chi/tools/alc/add-alc-library-dependency)
  * [Unity中使用 ALC SDK V2](https://onestore-dev.gitbook.io/dev/chi/tools/alc/using-alc-sdk-v2-in-unity)
  * [升级到ALC V2](https://onestore-dev.gitbook.io/dev/chi/tools/alc/upgrading-from-v1-to-v2)
  * [在 Unity 中升级到 ALC SDK V2](https://onestore-dev.gitbook.io/dev/chi/tools/alc/using-alc-sdk-v2-in-unity)
  * [说明ALC V2 Reference](https://onestore-dev.gitbook.io/dev/chi/tools/alc/alc-v2-reference)
* ### **下载 ALC** <a href="#applicationlicensecheckeralc-shuo-ming-xia-zai-alc" id="applicationlicensecheckeralc-shuo-ming-xia-zai-alc"></a>
  * ALC(Application License Checker) Library可通过[git hub](https://github.com/ONE-store/app_license_check)下载。


---

# Agent Instructions: 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:

```
GET https://onestore-dev.gitbook.io/dev/chi/tools/alc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
