#avery_android-taptopay

1 messages Β· Page 1 of 1 (latest)

grim patioBOT
#

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

cinder gazelleBOT
hot cove
#

@turbid prawn hello! Can you share a lot more details around your exact integration end to end, what your code looks like, etc.?

turbid prawn
#

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

hot cove
#

thanks looking

turbid prawn
#

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

hot cove
#

what exact version of stripe-terminal-android do you have?

#

avery_android-taptopay

turbid prawn
#

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?

vocal sorrel
#

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?

turbid prawn
#

Yeah that works

#

But it's a physical device

#

I will upgrade

#

Oh there is a breaking change lol

vocal sorrel
#

πŸ˜…

turbid prawn
#

Is there a place to see the upgrade diff?

#

Like what was chnaged

#

Seems the ConnectionConfiguration.LocalMobileConnectionConfiguration was changed

hot cove
#

Also you said this worked fine days ago. How sure are you that you really tested this end to end on Android?

turbid prawn
#

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

hot cove
#

ah gotcha

#

so it worked in prod fine and then in debug mode you forgot to enable the simulated device?

turbid prawn
#

Correct

hot cove
#

awesome!

turbid prawn
#

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

hot cove
turbid prawn
#

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

hot cove
#

#toomanydocs

turbid prawn
#

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?

hot cove
#

(we're looking)

turbid prawn
#

All good!

uncut axle
#

πŸ‘‹ 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

hot cove
#

@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