#avery_android-taptopay
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/1215805448138129448
π Have more to share? Add more details, code, screenshots, videos, etc. below.
@turbid prawn hello! Can you share a lot more details around your exact integration end to end, what your code looks like, etc.?
Sure
I find a reader using the config new DiscoveryConfiguration.LocalMobileDiscoveryConfiguration(false);
Then I think I get the error before I even get to a connect method
Let me get the full stacks
I am trying to find the last place I get to before this error comes up
thanks looking
The onFailure is being called in discoverReaders
Maybe the config is weird, let me try fully hard coding the example
Hmm I believe I might have worms in my brain
implementation("com.stripe:stripeterminal-core:3.3.0")
implementation("com.stripe:stripeterminal-handoffclient:3.3.0")
implementation("com.stripe:stripeterminal-localmobile:3.3.0") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
Wait I got a new error
com.stripe.stripeterminal.external.models.TerminalException: Debuggable applications are not supported in the production version of the localmobile reader. Please use a simulated version of the reader by setting DiscoveryConfiguration.isSimulated to true.
Where do I set the localmobile reader settings?
Do I have to use simulated mode on my mobile or is there a way to test on Android none production mode?
Hi π
Taking a quick look, I notice you're one minor version behind. We're on 3.4.0 currently. I don't know yet if it's related but I wanted to flag it.
We've had issues in the past where a bad dependency in older versions caused issues.
From our docs
To test your integration with the Tap to Pay on Android reader, set DiscoveryConfiguration.isSimulated to true during reader discovery.
Can you try it with isSimulated set to true and just verify that works?
Yeah that works
But it's a physical device
I will upgrade
Oh there is a breaking change lol
π
Is there a place to see the upgrade diff?
Like what was chnaged
Seems the ConnectionConfiguration.LocalMobileConnectionConfiguration was changed
Also you said this worked fine days ago. How sure are you that you really tested this end to end on Android?
Yeah I upgraded to 3.4 like Snufkin said so that's why the Configuration was different
I think the issue was using isSimulated to false when not running production bundle
ah gotcha
so it worked in prod fine and then in debug mode you forgot to enable the simulated device?
Correct
awesome!
Well I expected to see the test tap to pay mode like Apple has
I can has isSimulated = false on iOS and run in debugger to use a Stripe test card
Seems like I can't do that on Android
Which is kinda weird
ah gotcha, yeah Android doesn't support this. See https://docs.stripe.com/terminal/payments/setup-reader/tap-to-pay?platform=android#supported-devices where we say
Android device emulators arenβt supported by Tap to Pay.
I am not on an emulator
I am on a physical device
If I have isSimulator = false and try to run in debug it gives the error I showed above
com.stripe.stripeterminal.external.models.TerminalException: Debuggable applications are not supported in the production version of the localmobile reader. Please use a simulated version of the reader by setting DiscoveryConfiguration.isSimulated to true.
That's why I asked if there is a way to move the localmobile reader not into the production version so I can test on the physical device without having to use live payments
ah yes sorry there's https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=tap-to-pay#discover-readers that explains that part
#toomanydocs
Yeah lol
As you see I am not the best at fully reading them
Sorry about that
Have fully written an iOS and Android port of Tap to Pay in the last week
Getting both SDKs mixed up
Alright I have a question about the new connectReader since it seems the docs have not been updated for 3.4.0 yet
The third param is a local reader discovery listener, if I have auto reconnect to true, I can basically ignore that correct?
(we're looking)
All good!
π hopping in - I don't think you'd want to ignore it entirely so you can handle cases where connection isn't supported at all. If the device you're working with doesn't support tap to pay at all the onFailure callback would return an exception and there's no "reconnection" happening here since initial connection didn't work in the first place
@turbid prawn does that makes sense? We're closing down for the week end so I want to make sure you see this before we archive the thread