{"action":"created","issue":{"url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/237","repository_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc","labels_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/237/comments","events_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/237/events","html_url":"https://github.com/chariotsolutions/phonegap-nfc/issues/237","id":153750453,"number":237,"title":"addTagDiscoveredListener is not working after addNdefListener is being registered","user":{"login":"Swathi8","id":13765124,"avatar_url":"https://avatars.githubusercontent.com/u/13765124?v=3","gravatar_id":"","url":"https://api.github.com/users/Swathi8","html_url":"https://github.com/Swathi8","followers_url":"https://api.github.com/users/Swathi8/followers","following_url":"https://api.github.com/users/Swathi8/following{/other_user}","gists_url":"https://api.github.com/users/Swathi8/gists{/gist_id}","starred_url":"https://api.github.com/users/Swathi8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Swathi8/subscriptions","organizations_url":"https://api.github.com/users/Swathi8/orgs","repos_url":"https://api.github.com/users/Swathi8/repos","events_url":"https://api.github.com/users/Swathi8/events{/privacy}","received_events_url":"https://api.github.com/users/Swathi8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-09T10:51:01Z","updated_at":"2016-05-09T14:42:47Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using [addTagDiscoveredListener](https://github.com/chariotsolutions/phonegap-nfc#nfcaddtagdiscoveredlistener) and [addNdefListener](https://github.com/chariotsolutions/phonegap-nfc#nfcaddndeflistener) 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.\r\n\r\nI'm using [Backbone](http://backbonejs.org/) in front-end. when view renders, registering any one of these methods based some condition and removing listeners on destroy of the view.\r\n\r\nOnce `addNdefListener` is registered and remove it on view destroy. And registering `addTagDiscoveredListener` method on view render is not calling callback of `addTagDiscoveredListener` method. Where as it works before registering the `addNdefListerer`.\r\n\r\nDon't know what is happening here!, Why `addTagDiscoveredListener` is not working once `addNdefListener` method is register. Is anything I'm doing wrong?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/comments/217884340","html_url":"https://github.com/chariotsolutions/phonegap-nfc/issues/237#issuecomment-217884340","issue_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/237","id":217884340,"user":{"login":"don","id":3133,"avatar_url":"https://avatars.githubusercontent.com/u/3133?v=3","gravatar_id":"","url":"https://api.github.com/users/don","html_url":"https://github.com/don","followers_url":"https://api.github.com/users/don/followers","following_url":"https://api.github.com/users/don/following{/other_user}","gists_url":"https://api.github.com/users/don/gists{/gist_id}","starred_url":"https://api.github.com/users/don/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don/subscriptions","organizations_url":"https://api.github.com/users/don/orgs","repos_url":"https://api.github.com/users/don/repos","events_url":"https://api.github.com/users/don/events{/privacy}","received_events_url":"https://api.github.com/users/don/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T14:42:47Z","updated_at":"2016-05-09T14:42:47Z","body":"Android always calls the most specific listener for any tag. If you have `addTagDiscoveredListener` and `addNdefListerer` NDEF tags always end up with `addNdefListerer`\r\n\r\nI don't recommend removing listeners, I'd always keep both listeners added."}}