#mark-h_code

1 messages ¡ Page 1 of 1 (latest)

digital sonnetBOT
#

👋 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.

normal ferry
#

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())
        )
    }
}
delicate junco
#

No idea how that SDK works or wraps ours, checking with a colleague

digital sonnetBOT
plucky hamlet
#

Hey! Taking over for my colleague. Let me catch up.

#

Are you implementing apps-on device terminal application ?

normal ferry
#

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.

plucky hamlet
#

Have you had a chance to check/run our official sample project ?

#

Are you able to reproduce the issue on it ?