Open dwiyasko opened 1 year ago
@dwiyasko Do you see this issue this frequently on all Sunmi v2s devices, or is it particularly bad on this one device?
@maggiewhite-stripe it's frequently happened on all Sunmi v2s devices.
@dwiyasko Sorry for the delay in my update. I'm having trouble reproducing this issue on my Sunmi V2s.
isNFCEnabled()
function?Hi @maggiewhite-stripe Sorry for the delay, we are facing another issue related to Wisepad BT reader.
Regarding your question:
private fun isNFCAvailable(): Boolean {
val adapter = (getSystemService(NFC_SERVICE) as NfcManager).defaultAdapter
return adapter != null
}
error_code_reader_error_local_mobile_nfc_disabled
For now, we solve the issue with a 1-second retry mechanism, the pattern is, the first try of collection will say NFC disabled, then the next try will work as expected.
Any insight would be very helpful.
Hi @dwiyasko -- I realize that we haven't responded to this issue for quite some time (sorry!), but can you upgrade to the latest version and check if it's still an issue? We've been actively developing TTP, so it would be helpful if we could get clear reproducible steps on the latest version of the SDK (3.5.0).
Summary
Using Tap to Pay Android feature deps:
com.stripe:stripeterminal:2.20.0
com.stripe:stripeterminal-localmobile:2.20.0
When the device's screen is turned off without leaving the app and then turned on, sometimes get failed when collectPaymentMethod with the message "NFC is disabled", even I check NFC adapter right after the device is turned on its returns
true
or enabled.Code to reproduce
When the device screen is turned off by pressing the power button without leaving the app, network Listener is triggered with
Unknown
state. Then, when turned on the screen again, will trigger network listener withOnline
state.So, I check NFC adapter right after, and it says NFC is enabled.
But when starts payment and reaches
collectPaymentMethod()
, will fail withNFC is disabled
error message and errorCode:error_code_reader_error_local_mobile_nfc_disabled
This issue is intermittent but happens quite often, 6 occurrences out of 20 are quite big. Happen on Sunmi v2s Pro device Android 11, not sure about other devices.