> For the complete documentation index, see [llms.txt](https://streampay.gitbook.io/streampos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://streampay.gitbook.io/streampos/remote-integration/sdk-connect.md).

# SDK Connect

SDK connect is a service that allows you to connect your app remotely to the SDK using Bluetooth, or WiFi.

### Initialize

1. Add Gradle dependency by adding the following code to your Android App `build.gradle`

```
dependencies {
implementation "io.streampay:streampay-connect:0.0.13"
}
```

2\.  Create a single instance of Stream**Pay object** `context` wherever you need

{% tabs %}
{% tab title="Kotlin" %}

```kotlin
val streampay = StreamPay(this, AuthenticationData.UserEnter, Locale.getDefault(), Environments.SANDBOX)
```

{% endtab %}

{% tab title="Java" %}

```
streamPay = new NearPay(this, AuthenticationData.UserEnter.INSTANCE, Locale.getDefault(), Environments.SANDBOX);
```

{% endtab %}
{% endtabs %}

3\. Create Stream**Pay** connect object and add Stream**Pay object** to it

{% tabs %}
{% tab title="Kotlin" %}

```kotlin
val streampayConnect = StreampayConnect(this,streamPay)
```

{% endtab %}

{% tab title="Java" %}

```java
streampayConnect = new StreampayConnect(this,streamPay);a
```

{% endtab %}
{% endtabs %}

### Show()

show(): display a view with the current state and the option to connect with two different methods (Bluetooth and WebSocket) and disconnect.

```
streampayConnect.show();
```

### Disconnect()

* disconnect(): return true if there is a session to disconnect or attempt to new connect to stop. return false otherwise.

```
streampayConnect.disconnect()
```

### getSession(): &#x20;

* getSession(): return current session or null.

```
streampayConnect.getSession()
```

Find session data [here](broken://pages/oDmngbutAdZXs6Wtri4g#session-data)
