# 설치

## 요구사항 <a href="#requirements" id="requirements"></a>

Android API 버전 <mark style="color:blue;">24</mark> 이상&#x20;

## 설치하기 <a href="#installation" id="installation"></a>

### WepinLoginLibrary를 .gradle에 추가하기  <a href="#add-wepinloginlibrary-to-.gradle" id="add-wepinloginlibrary-to-.gradle"></a>

프로젝트레벨의 build gradle 파일에 JitPack 레포지토리를 추가합니다.

```kts
 dependencyResolutionManagement {
     repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
     repositories {
         google()
         mavenCentral()
         maven("https://jitpack.io") // <= Add JitPack Repository
     }
 }
```

### WepinLoginLibrary를 dependencies에 추가하기 <a href="#add-wepinloginlibrary-to-dependencies" id="add-wepinloginlibrary-to-dependencies"></a>

앱의 build gradle 파일에 아래와 같이 추가 합니다. 버전은 사용하고자 하는 릴리즈 버전을 넣으면 됩니다.&#x20;

```kts
dependencies {
  // ...
  implementation("com.github.WepinWallet:wepin-android-sdk-login-v1:vX.X.X") 
}
```

### Permission 추가하기  <a href="#add-permission" id="add-permission"></a>

앱의 AndroidManifest에 아래와 같이 추가 합니다.

```xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
```

### Deep Link 설하기 <a href="#setting-up-deep-link" id="setting-up-deep-link"></a>

#### Deep Link scheme format : <mark style="color:blue;">`wepin. + Your Wepin App ID`</mark>

사용자 정의 스킴이 사용될 때, WepinLogin 라이브러리는 매니페스트 플레이스홀더를 통해 이 사용자 정의 스킴을 사용하여 모든 리디렉션을 쉽게 캡처하도록 구성할 수 있습니다.

앱의 build gradle 파일에 아래처럼 추가 합니다.&#x20;

```html
// For Deep Link => RedirectScheme Format : wepin. + Wepin App ID
android.defaultConfig.manifestPlaceholders = [
  'appAuthRedirectScheme': 'wepin.{{YOUR_WEPIN_APPID}}'
]
```

앱의 AndroidManifest 파일에 아래처럼 추가 합니다.&#x20;

```xml
<activity
  android:name="com.wepin.android.loginlib.RedirectUriReceiverActivity"
  android:exported="true">
  <intent-filter>
     <action android:name="android.intent.action.VIEW" />

     <category android:name="android.intent.category.DEFAULT" />
     <category android:name="android.intent.category.BROWSABLE" />
     <data
      android:host="oauth2redirect"
      android:scheme="${appAuthRedirectScheme}" />
  </intent-filter>
</activity>
```

## 릴리즈  <a href="#release" id="release"></a>

릴리즈된 패키지 버전은 아래 깃허브에서 확인 가능합니다.

{% embed url="<https://github.com/WepinWallet/wepin-android-sdk-login-v1/releases>" %}


---

# 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://docs.wepin.io/widget-integration/android-java-and-kotlin-sdk/login-library/installation.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.
