#mauliks_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230870405355671632
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
hello
You shouldn't need the serial number here at all. You first call discoverReaders: https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=ios&reader-type=bluetooth#discover-readers which will return you those readers that are available within proximity and then you connect to your desired reader via connectBluetoothReader: https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=ios&reader-type=bluetooth#connect-reader
Ah ah you are saying you are only storing the serial number to identify the reader?
Sorry I think I misunderstood your question at first
yes I already did this and now I have connected reader
now thing is, if I reopen the same screen, which lists the near by readers, the logs says already connected and it fails to list. So i wanted to displayed currently connected reader in that UI
the Doc says I need to disconnect the reader and re-connect via connectBluetoothReader
then only discoverReaders provides list of readers
I hope my question is clear to you else I can explain other way
Sorry I'm still not fully understanding... the goal is to show the currently connected reader on the current app UI and you are having trouble retrieving which reader is connected?
no no
let me explain again
Here, in my app, discoverReaders will lists readers to select.
Once I select the reader it will get connected by connectBluetoothReader by passing selected reader from the list.
now if user reopens the same screen, then discoverReaders will fails and says already reader is selected
Sure... but why does that matter? What do you want to accomplish?
Like you should only be calling discoverReaders if you aren't already connected
if I am connected, and open the page I want to show an already connected reader with check marked
to show user that this reader is already connected with the iPad
Then you just build that yourself based on having already connected. You would track this yourself
Hold on one sec
I believe there is a method to return details about the connected Reader
retrieveReaderSettings this?
it says this is not for M2 reader ๐
the issue is, discoverReaders this fails if device is already connected otherwise I could match serial number and show it as connected
so is there a way to scan devices even if device is connected?
One minute, conferring with a colleague about the best way to handle this scenario
yes
and also is there a way to know that the device is connected to the reader?
if connected so I can show on UI that its connected and if not I can add validation before going to check our screen