#newtreyes_code

1 messages ยท Page 1 of 1 (latest)

slender iceBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250010057043742731

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

outer scroll
#

Hi @tepid hearth

slender iceBOT
outer scroll
#

Hi @outer stump

outer stump
#

๐Ÿ‘‹ happy to help

#

give me a second please

outer scroll
#

Sure

#

thank you

outer stump
#

we don't really support flutter in this channel

outer scroll
#

That's fine

#

I need a way to do it on Android

#

I can take care of the Flutter part

outer scroll
#

Ok. The issue is we've had cases where the user kills the app after collectSetupIntentPaymentMethod() is called. When that happens, we lose the Cancelable reference. And when the user restarts the app, it tries to reconnect to the reader and it fails because it tells us that the process is still running.

outer stump
#

why don't you cancel the Cancelable on app close?

outer scroll
#

It's not always possible to do so. The OS kills the app and the app receives no warning about what's going to happen.

#

We can kill the process if the app is detached or paused though

#

but it would be great if on restart, we could query the status (is it scanning for readers? Is it waiting for the CC to be read?) and react to that.

outer stump
#

hmmm, let me think about that for a second

outer scroll
#

Thank you

outer stump
#

I think the only possible solution here is to use the FailIfInUse parameter when connecting to the reader

outer scroll
#

Right. But then the only way to recover is to ask the user to restart the reader completely, right?

outer stump
#

no

#

when you connect with this flag on

#

When failIfInUse is true, an error will be returned when attempting to connect to a reader that is already collecting a payment
which means you need to set failIfInUse to false

outer scroll
#

oh, ok

#

if set to false, what will happen?

outer stump
#

and then this would cancel the existing action on the terminal

outer scroll
#

Nice!!!

#

It would be great if that usage scenario would be detailed in the docs

#

I was not considering that

outer stump
#

yes I agree

#

I will flag that

outer scroll
#

Do we have the same option on iOS?

#

I will flag that
Awesome

slender iceBOT
outer scroll
#

Nice

#

I hadn't seen that either until now

frank citrus
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!