#hwihwi_android-ttp-simulation

1 messages ยท Page 1 of 1 (latest)

boreal peakBOT
#

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

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

torpid grail
#

hwihwi_android-taptoppay

#

@opaque orchid can you provide more context around what your exact code is doing? I need to understand what backs the picture

opaque orchid
#

Here is my kotlin code

#

The doc says
When your application is ready to collect a payment, the Stripe Android SDK takes over the display to handle the collection process. After calling the collect payment method, your application remains running. The Android device displays a full-screen prompt to the cardholder, instructing them to present their card or NFC-based mobile wallet.

But when I collect payment with a live mode account, I still see the button "Tap To Simulate Payment"

#

This is what see when collect payments with a live account, I don't know if I miss anything

torpid grail
#

someone on my team is looking and we think it's because you have a test mode deploy maybe or use a simulated reader

#
            isSimulated = isApplicationDebuggable,
        )```
#

are you sure isSimulated is false here?

opaque orchid
#

let me check again,
but may I ask that isSimulated must be false, then the SDK will show the real UI as the doc described right?

torpid grail
#

it should yes. Hopefully you can repro quickly!

#

cc @plush zealot who is going to take over for me in case you have follow up questions but we're confident this was your issue

plush zealot
#

๐Ÿ‘‹

opaque orchid
#

When I set isSimulated = false
I am stuck at the step connecting to reader
I am using Samsung Galaxy A35 with NFC-enabled

plush zealot
#

Okay, thats a lot. Give me a minute to review it

opaque orchid
#

Here is my function to connect reader

plush zealot
#

Okay, thank you. And, when you attempt to connect to the reader, you are getting stuck. Do you see the onFailure code running?

opaque orchid
#

When I use this lines of code I can connect

val isApplicationDebuggable = 0 != applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE
val config = DiscoveryConfiguration.LocalMobileDiscoveryConfiguration(
isSimulated = isApplicationDebuggable,
)

but when I set isSimulated = false,
I see this error
class=TerminalSession
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.

plush zealot
#

Sorry, can you wrap the code and error in three ` marks? It'll apply formatting that is helpful when reading them

opaque orchid
#

class=TerminalSession 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.

#

The above error throw when I use this code:

val isApplicationDebuggable = 0 != applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE val config = DiscoveryConfiguration.LocalMobileDiscoveryConfiguration( isSimulated = false, )

plush zealot
#

Okay, the error is essentially telling you that you cannot have your integration in debuggable mode while running with isSimulated set to false.

#

Are you using Test mode Publishable Keys?

opaque orchid
#

I am using live mode publisable key

plush zealot
#

But you are running it on Android Studio? Is it connected?

#

(LIke to Logcat)

opaque orchid
#

yes, I am using android studio and logcat

#

so do I have to use on a release version (install via apk file)

plush zealot
#

Yes I think so. For security reasons we cannot show logs for a non-simulated reader

opaque orchid
#

Let me try with a release version

#

Thanks @plush zealot , it works now when I use on a release version

#

Can you confirm is it correct?

plush zealot
#

Okay great! ๐ŸŽ‰

#

Yes that is how it should behave

#

You can only get logs out from a simulated reader

opaque orchid
#

May I ask one more question, the position of the amount in the doc at the top of the screen, but from my app is at the bottom, is it controlled by the SDK, we cannot adjust right?

plush zealot
#

Correct. AFAIK it is not configurable. I see it is a feature request that has been raised. If you want I can add your interest to that request.

opaque orchid
#

It is ok for me now,
by the way thank you very much for your support today. Have a good weekend!

plush zealot
#

๐ŸŽ‰ I am happy we were able to resolve your issue. Have a good weekend ๐Ÿ™‚

boreal peakBOT