#mauliks_api

1 messages ยท Page 1 of 1 (latest)

violet arrowBOT
#

๐Ÿ‘‹ 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.

sullen stagBOT
warped locust
#

Hello

queen plover
#

hello

warped locust
#

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

queen plover
#

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

warped locust
#

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?

queen plover
#

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

warped locust
#

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

queen plover
#

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

warped locust
#

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

queen plover
#

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?

warped locust
#

One minute, conferring with a colleague about the best way to handle this scenario

queen plover
#

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

warped locust
#

You should be able to just call Terminal.shared.connectedReader

queen plover
#

wow

#

not sure how could I miss this

#

this is exactly I was looking for