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 StreamPay object context wherever you need

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

3. Create StreamPay connect object and add StreamPay object to it

val streampayConnect = StreampayConnect(this,streamPay)

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():

  • getSession(): return current session or null.

streampayConnect.getSession()

Find session data here

Last updated