Closed Swathi8 closed 8 years ago
Android always calls the most specific listener for any tag. If you have addTagDiscoveredListener
and addNdefListerer
NDEF tags always end up with addNdefListerer
I don't recommend removing listeners, I'd always keep both listeners added.
Hi,
I'm using addTagDiscoveredListener and addNdefListener methods to discover is any nfc tag found(if so, write ndefMessage to tag) and read data from nfc tag respectively. At any point of time only one of the method will be registered based on some condition.
I'm using Backbone in front-end. when view renders, registering any one of these methods based some condition and removing listeners on destroy of the view.
Once
addNdefListener
is registered and remove it on view destroy. And registeringaddTagDiscoveredListener
method on view render is not calling callback ofaddTagDiscoveredListener
method. Where as it works before registering theaddNdefListerer
.Don't know what is happening here!, Why
addTagDiscoveredListener
is not working onceaddNdefListener
method is register. Is anything I'm doing wrong?