Member-only story
Reading/Writing Non-NDEF NFC Tags in Android
A few months ago I was requested to make an app to read/write from/to Non-NDEF NFC Tags.
While, according to the official Android reference, for the standard NDEF Tags you can read NdefMessage
objects from intent extras and write to an NDEF tag by calling the writeNdefMessage method on the Tag object, it is not that simple when it comes to Non-NDEF NFC Tags: you will need to cope with raw commands and their payloads.
Since I’ve recently been in Android Non-NDEF Tags Hell, I decided to write down what worked for me, may it be useful for someone else.
First of all you will have to declare the proper permissions inside your manifest
Then you will have to add an nfc_tech_filter.xml to your res/xml folder, in order to declare the NFC Tag technology/ies you want to handle. In my case it was Nfc type V