Skip to main content

Writing multiple data types in NFC tags in a single tap



Is it possible to write more than one data type (like two urls or one url and one text) into a NFC tag from Android in a single tap?




Comments

  1. You can, but when you scan a tag, it can only have one data type that Android uses to determine what type of tag it is. This data type is determined by the first NDEF record in your NDEF message. Android assigns a MIME type or URI to this record so it can figure out which application is best to start to handle the tag. So, if you write a text record and URI on a tag, Android will think it is a plain text tag if that record is first, or a URI tag if that record is first. You can still read all the data as normal though.

    ReplyDelete
  2. Yes, if you are using Ndef. What you have to do is add more than one Ndef record to a Ndef message, then you can send the whole message in one tap. The main things that limit how many records you can add to the message are the size of the entire message and the memory size on the receiving device (like a tag). If your message is larger than the available memory, it won't send.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?