Automatically Reading Data From Nfc Tag
Hi I am trying to read data from NFC Tag. Tha data is read no problem with that. But I have to scan my Tag two times to display data. The first time when I scan tag it initiates th
Solution 1:
The problem is, onNewIntent isnt called in onCreate method. The quick solutions that come to mind are:
in the onCreate method you could chceck the intent type. If its a tag being discover, you handle it just the same way as in onNewIntent.
Another solution would be to place the handling code in onResume (if tag reding is all your app does) and checking the intent there.
Maybe there are cleaner solutions, ill give it some thought later, but for now, this should help you.
Post a Comment for "Automatically Reading Data From Nfc Tag"