Skip to content

Commit

Permalink
Only use NFC if available
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Sep 13, 2024
1 parent aa485d4 commit e12c9a4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ class MainActivity : FlutterFragmentActivity() {

allowScreenshots(false)

yubikit = YubiKitManager(
UsbYubiKeyManager(this),
val nfcManager = if (NfcAdapter.getDefaultAdapter(this) != null) {
NfcYubiKeyManager(this, NfcStateDispatcher(nfcStateListener))
)
} else null

yubikit = YubiKitManager(UsbYubiKeyManager(this), nfcManager)
}

override fun onNewIntent(intent: Intent) {
Expand Down

0 comments on commit e12c9a4

Please sign in to comment.