Android SDK Proxy

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

Initialize

  1. Add gradle dependency by adding the following code to the your Android App build.gradle
dependencies {
    implementation 'io.nearpay:nearpay-proxy-v2:0.0.2'
}
  1. Create single instance of NearPay object with context wherever you need.
            val nearpayProxy = NearpayProxy.Builder()
                    .port(8080)
                    .context(requireContext())
                    .environment(environment)
                    .networkConfiguration(NetworkConfiguration.SIM_PREFERRED)
                    .loadingUi(true)
                    .build()

Show Connection

Display a view with current state and option to connect with two different method (bluetooth and websocket) and disconnect.

nearpayProxy.showConnection();