-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement NFC data retrieval for new multiplatform stack.
On Android, this works on both the mdoc and mdoc reader side. On iOS this only works on the mdoc reader side since HCE isn't generally available. In addition to NfcTransportMdoc and NfcTransportMdocReader, also add unit tests for the happy path and cases where the tag reader has limits on APDU. Also slightly improve tests for MdocNfcEngagementHelper. Change scanNfcMdocReader() so it's possible to run the code handling the resulting MdocTransport in the coroutine for handling the NfcIsoTag. This is needed on the reader side when doing NFC data retrieval. Also add support for the somewhat dubious configuration of QR engagement and NFC data retrieval. This includes prompting the user to move the mdoc into the NFC field of the mdoc reader. Enable edge-to-edge and consume window insets for a more immersive experience, especially for Credman or NFC engagement presentments (no title bar, etc). Add a TODO about needing to examine display cutouts so the close button isn't overlapping with the cutout. Also introduce PresentmentTimeout so the UI layer can show appropriate message. Update NFC engagement to emit this and Presentable composable to react on it. Test: Manually tested on both Android and iOS. Test: New unit tests and all unit tests pass. Signed-off-by: David Zeuthen <[email protected]>
- Loading branch information
Showing
32 changed files
with
1,582 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...rc/commonMain/kotlin/com/android/identity/appsupport/ui/presentment/PresentmentTimeout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.android.identity.appsupport.ui.presentment | ||
|
||
/** | ||
* Thrown when timing out waiting for the reader to connect. | ||
* | ||
* @property message message to display. | ||
*/ | ||
class PresentmentTimeout(message: String): Exception(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.