#ubbyrob13

1 messages · Page 1 of 1 (latest)

chilly shardBOT
scenic crown
#

What part are you having trouble with and what do you mean by transition?

#

The Terminal SDK is separate from the main android SDK, but you can use them together

#

The context is a bit different though since your online payment flow is directly customer facing (they enter their own payment details) whereas the terminal flow is managed by one of your staff or agents, usually via some point of sale system

#

then the customer only interacts with the card reader itself

#

So a bit more detail about what you're trying to do, and where exactly you're having issues would help me offer better advice

sour tendon
#

My current trouble is getting the physical terminal connected to my android application - my application is a little bit different as users would go to a touch screen (android application) and add items, then are prompted to use the terminal machine (which would be monitored by staff but staff wont directly be interacting with the software unless issues arise)

scenic crown
#

OK, and whats the issue with connecting then? Are you following our docs and getting stuck somewhere?

#

Or are you trying to conceptualize a flow?

sour tendon
#

Yeah so i believe I was able to successfully set it up according to this
https://stripe.com/docs/terminal/payments/setup-integration?terminal-sdk-platform=android

but when I move to connect a reader - I am confused at whether to use /internet/bluetooth/simulated/usb - for all of these for android they also have a ReaderActivity.kt

but in the example - there is no ReaderActivity - so I am stuck going about how to implement this activity , and if an activity is necessary since I dont want them displayed to the user
https://github.com/stripe/stripe-terminal-android/blob/master/Example/kotlinapp/src/main/java/com/stripe/example/MainActivity.kt

Set up a Stripe Terminal SDK or server-driven integration to accept in-person payments.

GitHub

Stripe Terminal Android SDK. Contribute to stripe/stripe-terminal-android development by creating an account on GitHub.

scenic crown
#

So, it depends on how you manage readers but yes somewhere you need to do the discovery & connection

#

In the real world, you might have multiple readers and need to select one to connect to, but that's not appropriate for a customer to decide

#

So you'd need to choose & connect programmatically, behind the scenes

#

The example snippet, eg, just connects to the first reader discovered:
https://stripe.com/docs/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=simulated

Terminal.getInstance().discoverReaders(
      config,
      readers -> {
        // Just select the first reader here.
        Reader firstReader = readers.get(0);

        // When connecting to a physical reader, your integration should specify either the
        // same location as the last connection (selectedReader.getLocation().getId()) or a new location
        // of your user's choosing.
        //
        // Since the simulated reader is not associated with a real location, we recommend
        // specifying its existing mock location.
        ConnectionConfiguration.BluetoothConnectionConfiguration connectionConfig =
          new ConnectionConfiguration.BluetoothConnectionConfiguration(
            firstReader.getLocation().getId()
          );

        Terminal.getInstance().connectBluetoothReader( ...)
...
chilly shardBOT
sour tendon
#

based on this example it looks like it can only connect to a simulated terminal? or can it connect to a physical device (first reader) as well?

scenic crown
#

That snippet is just for simulated readers, yes