Skip to content

Commit

Permalink
removed artificial delay for onQrReady call
Browse files Browse the repository at this point in the history
  • Loading branch information
vkanellopoulos committed Sep 27, 2024
1 parent 868d98a commit 2a29e32
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ import com.android.identity.crypto.EcCurve
import com.android.identity.crypto.EcPublicKey
import eu.europa.ec.eudi.iso18013.transfer.DeviceRetrievalMethod
import eu.europa.ec.eudi.iso18013.transfer.engagement.QrCode
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

/**
* Qr engagement
Expand Down Expand Up @@ -137,18 +133,7 @@ internal class QrEngagement(
context.mainExecutor(),
).setConnectionMethods(retrievalMethods.connectionMethods)
.build()
// TODO Remove delay.
// Delay is simulating previous implementation which
// triggered onQrEngagementReady asynchronously.
// Reference implementation application registers listeners
// after calling configure method. This causes to miss
// the onQrEngagementReady event.
// Reference implementation application should be fixed
// and remove this delay.
CoroutineScope(Dispatchers.Default).launch {
delay(100)
onQrEngagementReady(QrCode(qrEngagement.deviceEngagementUriEncoded))
}
onQrEngagementReady(QrCode(qrEngagement.deviceEngagementUriEncoded))
}

/**
Expand Down

0 comments on commit 2a29e32

Please sign in to comment.