Skip to content

Conversation

@asghol
Copy link
Contributor

@asghol asghol commented Dec 19, 2025

…m intent (#1468)

Fixes #1468

Extracted the logic that takes a credential request and turns it into a DigitalCredentialsPresentmentMechanism so that single activity apps and apps that want to create their own visuals can still reuse that part of Multipaz. Tried to make the API surface strict enough to not complicate the logic inside but also leave little room for confusion.

Some thoughts:

  • Expecting consuming apps to turn the incoming intent into a ProviderGetCredentialRequest first since single activity apps will likely check whether the intent is consumable through retrieveProviderGetCredentialRequest(intent: Intent).

  • Expecting consuming apps to pass in a function for setResult so that other results than RESULT_OK is possible. This might not be needed so hoping for some feedback on this part.

  • Tests pass

  • Changelog updated as it is a new public facing function

  • Manually tested

  • Commit message is as short as I could make it

Example:
In the screenshot below, I've used the introduced function to set the presentation mechanism from a view model that belongs to a single activity app. It is not a polished example but a working one showing that it allows this type of app to make use of this part of multipaz as well.
Screenshot 2025-12-22 at 11 39 03

@asghol asghol force-pushed the set-dc-presentment-mechanism-from-intent branch from 3c835af to fb6a499 Compare December 19, 2025 13:11
@asghol
Copy link
Contributor Author

asghol commented Dec 22, 2025

Found something that should be fixed:

  • Exposed functions that can throw should be marked as such (setPresentmentModelMechanism)

…m intent (openwallet-foundation#1468)

Signed-off-by: Asgeir Hølleland <asgeir.holleland@gmail.com>
@asghol asghol force-pushed the set-dc-presentment-mechanism-from-intent branch from fb6a499 to 0e62788 Compare December 22, 2025 10:24
@davidz25
Copy link
Contributor

davidz25 commented Jan 8, 2026

Sorry for the delay here. Definitely supportive of the request to make the code generally more reusable... but we're currently reworking / simplifying some of the models / code related to presentment. I'll circle back here once that has landed!

@asghol
Copy link
Contributor Author

asghol commented Jan 9, 2026

No worries, did this to get more understanding as well as hoping to make this easier to reuse. Not waiting for this to be merged so no rush at all 😄

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.

Allow apps that don't want to have a dedicated activity to set a DigitalCredentialsPresentmentMechanism from intent

2 participants