#hwihwi_android-ttp-simulation
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/1238535687066619914
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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
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
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?
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?
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
๐
When I set isSimulated = false
I am stuck at the step connecting to reader
I am using Samsung Galaxy A35 with NFC-enabled
Here is my kotlin code
Okay, thats a lot. Give me a minute to review it
Sorry there is a lot of code here that isn't directly related to connecting to the reader. Cen you just provide the lines of code where you attempt to connect like we show here: https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=tap-to-pay#discover-readers
Okay, thank you. And, when you attempt to connect to the reader, you are getting stuck. Do you see the onFailure code running?
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.
Sorry, can you wrap the code and error in three ` marks? It'll apply formatting that is helpful when reading them
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, )
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?
I am using live mode publisable key
yes, I am using android studio and logcat
so do I have to use on a release version (install via apk file)
Yes I think so. For security reasons we cannot show logs for a non-simulated reader
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?
Okay great! ๐
Yes that is how it should behave
You can only get logs out from a simulated reader
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?
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.
It is ok for me now,
by the way thank you very much for your support today. Have a good weekend!
๐ I am happy we were able to resolve your issue. Have a good weekend ๐