#ubbyrob13
1 messages · Page 1 of 1 (latest)
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
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)
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?
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
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( ...)
...
The example for the real world (not using the similator) imagines showing a choice to a user who selects a selectedReader but you don't need to do that if you can pick it based on a machine pairing etc
https://stripe.com/docs/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=bluetooth#connect-reader
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?
You could do that for physical readers too, but you need to be careful to look at the reader object (with your code) to maek sure its the one you want
That snippet is just for simulated readers, yes