Search code examples
androidurinfcmimendef

Smart Poster VS plain text and URI


I am wondering what is the different between a smartPoster which has two records ( URI record , textRecord'json' ) and just two simple records first one is URI and the second is plain text'json'.

my second question is what the different between using MIME type and using plain text to send a json text form.


Solution

  • The answer to your first question is that the NFC Forum specifications allow for a Title on a the URI web link to be encoded. Therefore the smartposter specification contains both a a link and a text title and the URI spec contains only a link.

    In practice, the title is almost completely redundant. All mobile phone readers will either launch the page or present the link. Additionally, it will take up memory space which will restrict your choice of NFC chip. In short, don't use the smartposter spec.

    For your second question, it depends whether you refer to how the data is encoded on the tag or how the phone will interpret the data. I'll assume you mean how the phone will interpret which can be summarised as :

    If you encode as text and you scan the tag from within an App then you can handle the data as you prefer. However, if the App isn't opened first, the phone will just think the data is text and (usually) display it as such.

    If you encode as MIME type then, providing your App has already been installed on the phone and has registered the MIME type, then the phone will launch the App and pass the data. If you haven't installed the App, the phone will not know what to do.