- What is an NFC Tag?
- Which business card format is supported?
- Business cards: importing from address book
- How can I turn on NFC on my phone?
- How to disable the phone’s NFC prompts?
- Does NFC reduce my phone’s battery life?
- Which NFC Tag Types are supported?
- How much data can I store on a tag?
- How to delete existing contents of tags?
- Can I write multiple tags at once?
- Multiple Records on Tags – Why?
- Which devices are compatible with the peer-to-peer mode?
- How can I launch apps through NFC tags?
- How can I launch tasks on the phone through NFC tags?
- How can I NDEF format a tag?
- What is the use of the record’s ID?
- How can I lock / write protect NFC Tags?
- The app can’t write to a tag
What is an NFC Tag?
In most cases, NFC tags are stickers – they can be visible to you, or also be placed for example on the back side of a poster.
The NFC tag contains a little chip and an antenna. The chip stores the data and takes care of communicating with the reader device – e.g., your NFC smartphone. Your smartphone also contains an extra antenna used for NFC.
If you tap a tag, your phone and the tag communicate with each other. The antenna is used to transmit data and energy between the rader and the tag. It allows your phone to read the tag; if it’s a re-writeable tag, the device can also store data to the tag.
The tag doesn’t contain a battery; it’s powered by the electromagnetic field of your phone.
Which business card format is supported?
Nfc Interactor writes business cards according to the vCard standard, which is universally used and supported in all mobile devices.
- Windows Phone: Nfc Interactor can read and parse vCard 2.1 and 3.0 business cards. When writing, it defaults to version 2.1, as Windows Phone APIs would add additional encoding information to version 3.0 cards, which further increases the necessary tag size; version 2.1 already supports all necessary details. Future versions of Nfc Interactor might add a switch to choose the format, if needed.
- Symbian / MeeGo: Nfc Interactor can read and parse vCard 2.1 and 3.0 business cards. When writing, it uses version 3.0, as Qt APIs do not add encoding information and therefore there is no size difference between the different standard versions.
Business cards: importing from address book
Nfc Interactor for Windows Phone automatically converts contacts from the address book to the vCard standard.
Note that there is not always a 1:1 mapping between the way Windows Phone stores contacts in the address book and the vCard standard – Nfc Interactor will create the best possible match, but it might not be possible to directly store all the data from the phone contact. Please check the composed record after importing the contact from the address book!
Specifically, Windows Phone vCard APIs do not include Yomi names into generated vCards; therefore, Nfc Interactor does not include them in the editor.
Other potential issues are only theoretical: e.g., Windows Phone contacts would support 2 street address lines, whereas vCards only support a single line – Nfc Interactor would automatically combine those two street address lines into one. However, the Windows Phone UI currently only allows entering a single street address line; making this a hypothetical thought.
How can I turn on NFC on my phone?
Windows Phone 8
Settings -> tap+send. Turn on “NFC sharing”
Settings -> Connectivity -> NFC. Turn on “NFC”
MeeGo Harmattan / Nokia N9
Settings -> Device -> NFC. Turn on “NFC”
How to disable the phone’s NFC prompts?
When tapping tags that contain certain standardized / well-known contents, Windows Phone 8 always shows the dialog for the user to choose what to do with – e.g., to visit the URL or to launch the app.
This prompt even appears if the tag is a LaunchApp tag and the respective app is already running – the user will nevertheless be asked to launch the app (again), causing the phone to re-start the running app.
Unfortunately, this behavior of the Windows Phone 8 OS can’t be changed at the moment. We already reported the concern to Microsoft and hope that future versions of WP improve the behavior, in order to enable a better user experience for NFC apps.
Does NFC reduce my phone’s battery life?
To enable Near Field Communication, your phone needs to power an electromagnetic field, which is required to communicate with the passive (= battery-less) NFC tags.
This does have an impact on the battery life of your device. However, as NFC only works for very short distances, the field needs to be very small. Typically, the maximum feasible distance between the tag and the phone is half a centimeter. Compare that to possibly several kilometers between your tag and the nearest cell tower.
Additionally, NFC is usually only active when you’re actively using your phone, and deactivated as soon as the screen is locked (also for security purposes).
Which NFC Tag Types are supported?
In general, Windows Phone 8, Symbian, MeeGo support the standardized tag types: NFC Forum Tag Type 1 – 4
Several tag types are compatible to those standards:
- NFC Forum Tag Type 1: e.g., Broadcom Topaz
- NFC Forum Tag Type 2: e.g., NXP Mifare Ultralight, NXP Mifare Ultralight C, NXP NTAG203
- NFC Forum Tag Type 3: e.g., Sony FeliCa
- NFC Forum Tag Type 4: e.g., NXP DESFire, NXP SmartFX with JCOP
In addition, many phones support Mifare Classic tags – but this depends on the specific NFC chipset used by the manufacturers.
Tags like present in RFID passports are currently not supported by Windows Phone, Symbian or MeeGo.
How much data can I store on a tag?
The exact amount of data you can store on an NFC tag depends on the tag type and its configuration. In general, we’re talking about very small amounts of data – enough to store a link to a web page or to an app, but usually too small to store an image or a video.
The data size of a tag would usually start at around 48 bytes, the maximum is currently around 8 kB. There are also less common smaller or larger tags. Typical NFC Forum Type 2 tags are 192 bytes, Mifare tags 1 kB.
Note that not the full tag size is available to you – some of the memory size is used for headers and control data (e.g., to store the write protection status of the tag). Nfc Interactor for Windows Phone will show you the writable tag size when you touch a tag (the Symbian version can do so for selected tag types). For example, on an 192 bytes Type 2 tag, you might have 137 bytes available for writing.
Also, the header of the NDEF protocol will take a few bytes – depending on the record type you chose to write, and if you add optional information to the record like a record ID. For example, the header size of a single URI record (without an ID) is 5 bytes; but this specific record type can also shorten common URI beginnings like “http://” or “http://www.” into a single byte, which is already part of the header. Therefore, the complete NDEF message for the URI “http://www.nfcinteractor.com” only requires 22 bytes of writable memory on the tag.
How to delete existing contents of tags?
When writing NFC tags, you’re always overwriting the existing contents. As such, there is no need to specifically delete contents before writing a new message – just create the new message in the composer and write it to the tag.
If you want to make a tag appear empty, you can also write an empty message to the tag. In Nfc Interactor, go to the “tag composer”, do not add a record to the message and directly write the empty message to the tag. This 3-byte message is the minimum message to write to a tag, as it simply contains the header that the message / tag is empty.
Note that depending on the tag type, writing an empty message only overwrites the header information in the tag – it does not reset all the other contents. With a reader capable of reading the complete, raw memory area of the tag, it could still be possible to see the previous tag contents.
If you want to completely remove the current tag contents from raw reading devices: first write any kind of message to the tag, with a size that is sufficiently big to completely overwrite the previous tag contents. After this message has completely overwritten the previous tag contents, you can now write an empty message.
Can I write multiple tags at once?
No, in general phones only support writing one tag at a time. If you place two NFC tags on top of each other, the phone might either recognize only one tag, or not detect the tags at all.
Multiple Records on Tags – Why?
Most NFC apps only write a single record to a tag. The powerful dynamic tag composer of Nfc Interactor supports writing a message that contains multiple records.
To create such a tag, simply add more than one record to the composer by repeatedly tapping the ‘+’ symbol in the app bar. The records are written to the tag in the order they appear on the composer screen.
What is the use of multi-record tags? This depends on the platform:
- Windows 8 / Windows Phone 8: the OS only reads and acts upon the first record of the message. All the other records stored on the tag are ignored. If the first record in the message is not understood by the OS, the tag is ignored.
If a 3rd party app (like Nfc Interactor) is running in the foreground, it can read and parse the whole NDEF message, though. Therefore, on Windows (Phone), multi-record-tags are mostly relevant for developers.
- Symbian / MeeGo: the OS starts reading the message until it finds a record it can act upon. If for example the first record is an app-specific record, the phone will read the next record. If that would be a standardized URL record, the phone would open the URL.
Multi-record tags are therefore frequently used on these platforms to launch apps – these can register to be launched for custom records; a second, standardized URL record would then redirect the phone to the store to download the app in case it’s not yet installed.
- Android: the phones usually read all records on a tag and give the user the choice of which action to execute. Special records like the Android Application Record (AAR) are recommended to be present in a later position of the message. If the phone finds an AAR record in the complete message, it will launch the corresponding app in any case, no matter where the AAR is found. This allows using a standardized URL record as the first record in the message, for better cross-platform compatibility.
For directly launching apps in cross-platform scenarios, multi-record messages are also frequently used. See the article How to Create Cross-Platform LaunchApp NFC Tags for details.
Which devices are compatible with the peer-to-peer mode?
Nfc Interactor uses the standardized SNEP protocol for sending a message with peer-to-peer mode (from one device to another). The following operating systems include support for receiving SNEP out of the box:
- Windows 8
- Windows Phone 8
- MeeGo Harmattan PR 1.2+
- Android 4.0+
Earlier versions of Android use a Google proprietary protocol (NDEF Push Protocol – NPP), which is not supported by other devices.
Symbian is also using a proprietary protocol. Nfc Interactor for Symbian has experimental support for SNEP though, which means that you can send and receive SNEP messages with Nfc Interactor on that platform (while the app is running and in the foreground).
Nfc Interactor for Symbian / MeeGo can also send NDEF messages using a custom port / URN, which can be useful to test low-level LLCP connections, especially with custom hardware.
Note: sharing a picture or video via NFC is usually only initiated via NFC – the devices exchange Bluetooth or WiFi Direct data, and then use that channel to actually transfer the data. The reason is that NFC would be too slow; sending a picture from your phone’s camera could take a few minutes with NFC.
Unfortunately, exchanging Bluetooth / WiFi settings in this scenario is currently often not compatible between different platforms – e.g., triggering a picture share via an NFC tap does not currently work between Android and Windows Phone 8.
How can I launch apps through NFC tags?
The use case of launching apps through tapping NFC tags has not been standardized by the NFC Forum. As such, every platform currently available uses a different approach:
- Windows Phone 8 offers three ways of launching apps:
- LaunchApp tags: you can directly launch any kind of app if you know its ID. Nfc Interactor integrates an automated Windows Phone store search so that you do not have to find out the ID yourself.
Instructions: Add a “LaunchApp (Generic)” record, type the name / publisher / keyword and tap “search”. You can now directly select the app you want to launch from the tag.
Note that Nfc Interactor sends search requests to the Microsoft store backend using a generic hardware ID and en-US locale (as this is where most apps available, according to statistics). Some exclusive or country-restricted apps might not be visible.In case you need to find the app ID yourself, the process is very easy as well: search for an app in the web-based Windows Phone store with your PC browser. The URL will contain the app ID – e.g., for Nfc Interactor: http://www.windowsphone.com/s?appid=4e1598fe-4885-4e2b-9c69-8d3f882c545b
In Nfc Interactor, specify this ID for the platform “WindowsPhone”. This will directly launch the app, or ask the user to download Nfc Interactor from the store if it is not already installed.
This tag type also allows passing custom parameters to the app; but you need to know what kind of parameters the app supports in order to write the right text into this field of Nfc Interactor. Contact the app authors to ask them if they support parameters through LaunchApp tags.
- Nokia Accessories: if you have a Nokia Lumia WP8 device, you can write a Nokia Accessories tag with Nfc Interactor. This will launch a special, pre-installed Nokia app that allows to launch any other app installed on your phone.
- Custom URI schemes: apps can register for a custom URI scheme, which then launches the app to handle this scheme. In case the user has not yet installed an app that understands this scheme, the user will be asked to search for an app in the store.
For example, Nfc Interactor will launch when it encounters a tag with the URL “nfcinteractor:”.
- LaunchApp tags: you can directly launch any kind of app if you know its ID. Nfc Interactor integrates an automated Windows Phone store search so that you do not have to find out the ID yourself.
- Android: uses Android Application Records (AAR) to launch apps. Specify the app to launch through its package name. You can find out the package name of the app through the URL in the web-based Google Play Store.
- Symbian / MeeGo: apps can register themselves to be launched through a specific custom record (external record type). E.g., Nfc Interactor launches when you tap a tag that contains a record with the External RTD and type name “nokia.com:nfcinteractor”.
Note that you can only launch apps that have registered for being launched; you can not launch any kind of app through that mechanism.
Nfc Interactor can write custom tags (choose the “Custom” type) to launch an app on Symbian, as well as LaunchApp tags (choose the “LaunchApp” type), custom URI schemes (choose the “URI” type) and Android Application Records (choose the respective type).
For more information, take a look at the following two articles:
How can I launch tasks on the phone through NFC tags?
The NFC Forum has not standardized the use case of adjusting phone settings based on NFC tags (e.g., to turn on Wifi, to adjust the volume, etc). Therefore, there is no tag that could do tasks on all phones.
Some apps on Android offer functionality to enable this behavior; these are always based on custom, app-specific tag formats, which launch the app, which in turn adjusts the phone settings.
Unfortunately, the strong security model of Windows Phone 8 also does not allow tags or any 3rd party app to modify phone settings – so there is currently no way to offer this functionality on Windows Phone 8.
Nfc Interactor v1.2.0 will add the option to write tags that directly open a specific settings page; but the actual settings change (e.g., activating flight mode) always has to be performed by the user.
How can I NDEF format a tag?
When you buy a tag, it might be completely empty (= not NDEF formatted). This means that the control structure for handling NDEF messages (e.g., to indicate the writable size) is not yet present on the tag.
Nfc Interactor for Symbian and MeeGo can NDEF format a tag if you write an empty message to the tag. After you have written an empty message, you can write any other kind of message to the tag. In the app settings, you can also activate that the app automatically writes an empty message first to format tags. This is useful if you need to write large quantities of tags.
Unfortunately, Windows Phone 8 does not currently support NDEF formatting tags. This is outside of what apps on that platform can do, so there is no way for Nfc Interactor to format tags. Please make sure when you buy tags that they are already NDEF formatted, or use a Symbian, MeeGo or Android phone to format tags.
What is the use of the record’s ID?
Several record types in Nfc Interactor allow adding an ‘Id’. The record ID is not used / visible when you tap the tag with your phone – therefore, you would usually not need to add the ID to a record.
IDs can be read by 3rd party apps, and can therefore be helpful for developers in some cases. E.g., a developer can add the ID to a record to add some ‘hidden’ information to a URL tag, which shouldn’t be visible in the URL itself. If the user taps the tag with his phone and the app is not running, the phone would only open the URL. If the tag is tapped while the app is running, it could also retrieve the record ID and therefore for example identify the specific tag.
How can I lock / write protect NFC Tags?
Nfc Interactor for Symbian allows reading the lock status for static memory tags of type NFC Forum Tag Type 1 + 2. Locking tags is not implemented by Nfc Interactor for Symbian; you can for example use the free Nokia Tag Writer app to lock a tag that you have written with Nfc Interactor.
Unfortunately, the Nokia N9 with MeeGo Harmattan as well as Windows Phone 8 do not support locking tags, as the APIs do not include this functionality and the platforms do not allow apps to send raw, low-level commands to tags, which would be required for locking tags.
Therefore, if you plan on mass-deploying locked tags with custom contents, it’s recommended that you order tags with the correct & locked contents directly from the factory. Most likely, you wouldn’t want to write thousands of tags with your phone anyway.
The app can’t write to a tag
In general, this can have three causes:
- The tag is not writable: you can only write to tags that are re-writable and have not yet been locked. For example an NFC Forum Tag Type 2 tag can never be unlocked again to change its contents after it has been locked once.
Windows Phone and Qt only support open tags; the platforms do not allow writing to tags with an activated security system (e.g., type 4 tags or Mifare tags that require a key for reading and/or writing).
- Tag type not supported: see the question “Which NFC Tag Types are supported?“
- Tag is not NDEF formatted: on Symbian or MeeGo, the phone can format the tag if you write an empty message to the tag first; afterwards, you can write any kind of message. In the app settings, you can also configure Nfc Interactor to always automatically write an empty message before writing the intended message, which can be helpful if you need to format & write a large quantity of empty tags.
Unfortunately, Windows Phone 8 currently does not support NDEF formatting empty tags; the operating system can only handle tags that are already NDEF formatted. This is a limitation of the platform and unfortunately outside of what Nfc Interactor can do.
Please make sure to get NDEF formatted tags when you order them; or try writing an empty message with Nfc Interactor for MeeGo / Symbian to format the tag, or use any similar tools on Android.