MdocProximityQrPresentment
A composable for presentment with QR engagement according to ISO/IEC 18013-5:2021.
This composable shows three different things, depending on state of presentmentModel:
in the PresentmentModel.State.IDLE state the composable returned by the showQrButton parameter is shown. Once the user clicks the "show QR code" button (e.g. the
onQrButtonClickedcallback is called) the presentment process starts and presentmentModel transitions to PresentmentModel.State.CONNECTING.in the PresentmentModel.State.CONNECTING state the the composable showQrCode is shown which is renders the QR code. When a reader scans the QR code and connects the presentment process moves on to the next step and presentmentModel transitions to PresentmentModel.State.WAITING_FOR_SOURCE and eventually other states.
in the other states, the Presentment composable is shown until the reader disconnect. This includes showing consent and authentication dialogs. When the reader disconnects presentmentModel goes to state PresentmentModel.State.IDLE and showQrButton composable is shown.
Applications should call PresentmentModel.reset before entering the composition containing this composable.
Parameters
a Modifier.
the name of the application.
the icon for the application.
the PresentmentModel to use which must have a PromptModel associated with it.
an object for application to provide data and policy.
a DocumentTypeRepository used to find metadata about documents being requested.
an ImageLoader for loading images from the network.
if true, multiple requests in a single session will be allowed.
a composable to show for a button to generate a QR code. It should call onQrButtonClicked when the user presses the button and pass a MdocProximityQrSettings which contains the settings for what kind of org.multipaz.mdoc.transport.MdocTransport instances to advertise and what options to use when creating the transports.
a composable which shows the QR code and asks the user to scan it.
the MdocTransportFactory to use for creating a transport.