Skip to content

Conversation

@farble1670
Copy link

@farble1670 farble1670 commented Jan 9, 2026

Allow for device engagement data obtained from an external source to be injected into the verification flow.

We specifically use this to add verification functionality to Android devices with only payment card NFC / without proper Android NFC. A proprietary SDK is used to retrieve the engagement data. The now-public method here is used to feed it into multipaz and continue the verification flow.

For reference, this is sample code how we're utilizing this method.

        val handover = buildCborArray {
          add(Bstr(data.handoverSelect))
          add(Bstr(data.handoverRequest))
        }

        // TODO: Invoke reflectively for now 
        // verificationHelper.setDeviceEngagement(
        setDeviceEngagementReflectively(
            data.deviceEngagement,
            handover,
            VerificationHelper.EngagementMethod.NFC_NEGOTIATED_HANDOVER
        )

        // Map proprietary connection methods to multipaz 
        val connectionMethods = data.connectionMethods.map { info ->
          MdocConnectionMethodBle(
              info.peripheralServerMode,
              info.centralClientMode,
              null,
              UUID.fromString(info.uuid.toString())
          )
        }

        verification.reportDeviceEngagementReceived(connectionMethods)

Wasn't sure if a unit test was required since this is just making an existing, tested code path public. However, I added a simple one.

Thank you for your consideration.

Testing

See unit test.

We also have this working end-end with our payment NFC hardware / SDK, which I can't reasonably demonstrate unfortunately.

@farble1670 farble1670 marked this pull request as draft January 9, 2026 00:43
@farble1670 farble1670 force-pushed the public_setdeviceengagement branch from ce7001e to f23dfe0 Compare January 9, 2026 00:48
@farble1670 farble1670 marked this pull request as ready for review January 9, 2026 00:51
@davidz25
Copy link
Contributor

davidz25 commented Jan 14, 2026

This seems OK but note that multipaz-android-legacy library will be removed at some point in 2026.

Can you update the PR to have DCO (Signed-off-by) so the checks can pass, please? Then we can merge it.

@farble1670 farble1670 force-pushed the public_setdeviceengagement branch from f23dfe0 to 874cf38 Compare January 14, 2026 16:40
@farble1670
Copy link
Author

This seems OK but note that multipaz-android-legacy library will be removed at some point in 2026.

Can you update the PR to have DCO (Signed-off-by) so the checks can pass, please? Then we can merge it.

Hi @davidz25 thanks for your attention.

I'm not familiar with the process for DCO. I amended the commit message with a sign off message. Please let me know if it's something more than that.

Allow for device engagement data obtained from an external source
to be injected into the verification flow.

Signed-off-by: Jeff Blattman <[email protected]>
@farble1670 farble1670 force-pushed the public_setdeviceengagement branch from 874cf38 to 694f5da Compare January 14, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants