# 메서드

Wepin widget android SDK에서 제공하는 메서드 입니다.

## openWidget

<mark style="color:blue;">`openWidget`</mark> 는 위젯 윈도우를 보여 줍니다. 사용자 로그인 여부에 따라 위젯 윈도우에 표시되는 화면은 다릅니다. 로그인이 되어 있지 않으면 로그인 화면이 표시됩니다.

### 예시

```javascript
wepin.openWidget()
```

## closeWidget

<mark style="color:blue;">`closeWidget`</mark> 는 위젯 윈도우를 닫습니다. 윈도우를 닫아도 로그아웃 되지 않습니다.&#x20;

### 예시

```javascript
wepin.closeWidget()
```

## getAccounts

앱에서 사용 가능한 계정 정보를 반환합니다. 계정 정보에는 네트워크 이름과 주소가 들어 있습니다. 반환 값은 <mark style="color:blue;">`Account`</mark>의 배열입니다. <mark style="color:blue;">`getAccounts`</mark> 는 위젯 로그인 이후에 사용 가능한 메서드입니다. &#x20;

```java
List<Account> accounts = wepin.getAccounts();
```

### Account

<mark style="color:blue;">`getAccounts`</mark> 함수의 반환 값 클래스의 인터페이스는 아래와 같습니다.

```java
public class Account {
    String address;  // 계정주소
    String network;  // 계정 블록체인 네트워크
}
```

* **address:** *string*\
  계정 주소
* **network**: *string*\
  계정의 블록체인 네트워크 입니다. 각 네트워크의 이름은 아래에서 확인 가능합니다.&#x20;

{% content-ref url="/pages/jNG611rZkq69C8zZKglh" %}
[지원 블록체인](/wepin/supported-blockchains.md)
{% endcontent-ref %}


---

# 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/deprecated/android-java-and-kotlin-sdk/methods.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.
