# 快速入门

## 引入依赖

### 雷鸟私有Maven接入

如果你可以访问雷鸟私有Maven服务，可以在settings.gradle中，引入私有maven服务器

```groovy
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        // 配置雷鸟私有Maven服务器
        maven {
            url 'http://172.16.46.52:9998/repository/maven-public/'
            allowInsecureProtocol = true
        }
    }
}
```

在项目主模块的build.gradle中引入如下依赖项，来完成依赖添加：

<pre class="language-groovy"><code class="lang-groovy"><strong>implementation 'com.rayneo.arsdk:ipcsdk-for-android:0.1.0'
</strong></code></pre>

### AAR文件接入

您也可以只是使用AAR文件依赖接入，先将[RayNeo IPCSDK for Android aar包](https://leiniao-ibg.feishu.cn/file/JV7Pbr026oMmSLxd8BfcqeEtnRh)放入主模块的libs目录下，如下图所示

<figure><img src="/files/7oEnggty4d4lJVedYAUc" alt=""><figcaption></figcaption></figure>

## 初始化

创建 `Launcher` 类的实例：

```java
Launcher mLauncher = Launcher.getInstance(context);
```

启用日志（默认关闭SDK Log）：

<pre class="language-java"><code class="lang-java">mLauncher.enableLog();//打开log
<strong>mLauncher.disableLog();//关闭Log，默认关闭
</strong></code></pre>

添加响应监听器：

```java
mLauncher.addOnResponseListener(response); //绑定响应器
```

## 关闭连接

移除响应监听器：

```java
mLauncher.removeOnResponseListener(response);//解绑响应器
```

断开连接：执行断开连接的操作，释放与眼镜的连接。

```java
mLauncher.disConnect();
```


---

# 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://rayneo.gitbook.io/rayneo-devdoc/x-xi-lie/android-kai-fa/ipc-sdk/kuai-su-ru-men.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.
