> 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 %}
