Skip to content

HCE_STATE_READ event is fired multiple times on tag reading #26

@buenaondalab

Description

@buenaondalab

I'm trying to emulate a NFCtagType4 with an Android device.
I'm able to read the tag but HCE_STATE_READ event is fired 3 times.
Is that the desired behaviour?
I fixed it locally in respondRead method inside NFCTagType4 class:

if (realLength == slicedResponse.length) {
      this.hceModel.getLastState()
                   .setValue(HceViewModel.HCE_STATE_READ);
    }

Could it be a valid solution to avoid multiple firings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions