#mark-h_code
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/1333413409693237341
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is basically the core of my changes
// StripeTerminal.kt
private fun connectHandOffReader(call: PluginCall) {
val foundReader = this.discoveredReadersList[0]
if (foundReader == null) {
call.reject("The reader value is not set correctly.")
return
}
val config: ConnectionConfiguration.HandoffConnectionConfiguration = ConnectionConfiguration.HandoffConnectionConfiguration(
this.handoffReaderListener
)
Terminal.getInstance().connectReader(foundReader, config, this.readerCallback(call))
}
var handoffReaderListener: HandoffReaderListener = object : HandoffReaderListener {
override fun onDisconnect(reason: DisconnectReason) {
notifyListeners(
TerminalEnumEvent.DisconnectedReader.webEventName,
JSObject().put("reason", reason.toString())
)
}
override fun onReportReaderEvent(event: ReaderEvent) {
notifyListeners(
TerminalEnumEvent.ReaderEvent.webEventName,
JSObject().put("event", event.toString())
)
}
}
No idea how that SDK works or wraps ours, checking with a colleague
Here's a link to the file where the SDK was implement:
https://github.com/capacitor-community/stripe/blob/main/packages/terminal/android/src/main/java/com/getcapacitor/community/stripe/terminal/StripeTerminal.kt
Hey! Taking over for my colleague. Let me catch up.
Are you implementing apps-on device terminal application ?
Yes that's right. I'm using the capacitor community plugin and they haven't implemented this part yet so I intend to add it.