SDK connect is a service that allows you to connect your app remotely to the SDK using bluetooth , WiFi.
- 1.Add gradle dependency by adding the following code to the your Android App
2.Create single instance of NearPay object with
contextwherever you need.
val nearpay = NearPay(this, AuthenticationData.UserEnter, Locale.getDefault(), Environments.SANDBOX)
nearPay = new NearPay(this, AuthenticationData.UserEnter.INSTANCE, Locale.getDefault(), Environments.SANDBOX);
3.create nearpay connect object and add NearPay object to it
val nearpayConnect = NearpayConnect(this,nearPay)
nearpayConnect = new NearpayConnect(this,nearPay);
- show(): display a view with current state and option to connect with two different method (bluetooth and websocket) and disconnect.
- disconnect(): return true if there is a session to disconnect or attempt to new connect to stop. return false otherwise.
- getSession(): return current session or null..