StreamPOS SDK
  • Introduction
  • Get Started
  • Security
  • SDK
  • Remote Integration
    • SDK Connect
    • iOS Integration
  • SDK Changelog
  • FAQ
  • SDK models
  • API endpoints
    • API
Powered by GitBook
On this page
  • Initialize
  • Show()
  • Disconnect()
  • getSession():
  1. Remote Integration

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)
streamPay = new NearPay(this, AuthenticationData.UserEnter.INSTANCE, Locale.getDefault(), Environments.SANDBOX);

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

val streampayConnect = StreampayConnect(this,streamPay)
streampayConnect = new StreampayConnect(this,streamPay);a

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

PreviousRemote IntegrationNextiOS Integration

Last updated 2 years ago