> For the complete documentation index, see [llms.txt](https://docs.wepin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wepin.io/en/deprecated/android-java-and-kotlin-sdk/method.md).

# Methods

The following shows the methods provided by the Wepin widget Android SDK.

## `openWidget`

The <mark style="color:blue;">`openWidget`</mark> method shows the widget window. The screen displayed in the widget window varies depending on the user's login status. If a user is not logged in, the login screen is displayed.

### Example

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

## `closeWidget`

The <mark style="color:blue;">`closeWidget`</mark> method closes the widget window. Closing the window does not log users out.

### Example

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

## `getAccounts`

The <mark style="color:blue;">`getAccounts`</mark> method returns user accounts of the networks available in the app. The returned value is an array of <mark style="color:blue;">`Account`</mark> object. <mark style="color:blue;">`getAccounts`</mark> is a method available after widget login.

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

### `Account`

The interface of the class returned by the <mark style="color:blue;">`getAccounts`</mark> function is as follows.

```java
public class Account {
    String address;  // The account address
    String network;  // The blockchain network of the account
}
```

* **`address`:** *string*\
  The account address
* **`network`**: *string*\
  The blockchain network of the account. The name of each network can be found below.

{% content-ref url="/pages/c58QTBKZd8FibB8m3Pc4" %}
[Supported blockchains](/en/wepin/supported-blockchains.md)
{% endcontent-ref %}


---

# 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://docs.wepin.io/en/deprecated/android-java-and-kotlin-sdk/method.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.
