How can we implement "Host Card Emulation (HCE)" with Flutter?

Viewed 433

We are working to implement HCE in flutter but till now can only read tag's information from the iOS version using the following codes -

void _readTag() {
  NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async {
    print("_tagRead:${tag.data}");
    result.value = tag.data;
    NfcManager.instance.stopSession();
  });
}

Ref: https://pub.dev/packages/nfc_manager

1 Answers

Last time I checked, Apple wasn't supporting HCE yet (and it was 1 year ago or so).
If you need to implement it on Android only, you can use the nfc_emulator library

Related