Roland Meyer
rmy.ch

Blog: Finally a use for NFC

forward back
Finally a use for NFC

Ever heard of NFC?
When I got my new phone I was excited about all the new features my old phone (a dumbphone) didn't have. One of them was NFC (Near field communication), a technology that is beginning to show up in the new generations of smartphones and similar devices. Even though I study computer science I had hardly ever heard of it before, and everyone I know replied with a confused face when I mentioned NFC to them.

Well, what does it do?
NFC enables short range radio communication between two devices or between one device and a passive element such as an NFC tag. The focus here is on "short range", which means only a few centimeters. The former would allow some useful applications, such as automatic electronic payment in shops or file transfer. However, as far as I know at the time of this writing there are no shops in Switzerland where I could pay using NFC, and why would I want to use NFC for file transfer when I got a million of alternatives already, ranging from bluetooth and wifi over FTP and e-mail all the way to cloud storage services. Because of this I was always more interested in the latter use case.

NFC tags?
There are various vendors of NFC tags and they don't cost much. They look like a small piece of plastic with a metal spiral glued to it, about the size of a stamp. The technology is similar to RFID which is used in things like hands-free train passes or implantable chips for pets. After I got my new phone I wanted to buy a set of these, but as it happened Jo beat me to it and gave me a set of 5 Samsung TecTiles for my birthday (thank you :)). They come with an app that allows you to program them to execute specific task when your phone touches them. From the point of view of a computer scientist who prefers to tinker this app is too limited and is thus useless, so I decided to build something myself.

What to build?
With the NFC tags beginning to collect dust over months I finally had an idea of what to use them for. Like many commuters I enjoy listening to music on the way to and from university. A problem that I assume every smartphone user is familiar with is the fact that touchscreen can only be operated by fingers (and toes). As the seasons become colder and wetter every day, the magnitude of the problem increases proportionally (or more). I am aware of the existence of special gloves that work with touchscreens, and I could also just use my stylus, but that would solve only half the problem. The other half of the problem is that I have to fetch the phone from my pocket every time I want to pause or change tracks and stow it back again afterwards. I observed myself long enough to know that I repeat this procedure at a high frequency, which can become really annoying. Rather than reverting to the strategy of just keeping the phone in my hand all the time I came up with an idea: why not use NFC tags?

Finally a use for NFC
After thinking about it for a while, last week I finally had the time (well, sort of) to implement an Android app that reacts to specific NFC tags and controls my music app (Poweramp, which happened to have quite a nice API). These tags I then inserted into my gloves such that my left hand would toggle play and pause and my right hand would skip to the next track. Now whenever I go outside I just start the app and put on my gloves. I no longer need to take the phone from my pocket but instead I can just hold my left or right hand in front of my chest pocket and my player does what I want it to do. The implementation was far easier than I had thought and I am happy with the results, which is why I often play around with my gloves now even when I'm not outside. The only downside is that, due to a security limitation of the Android system, NFC tags can only be read when the screen is on. As a result of this I had to write my application in such a way that it keeps the screen on in my pocket. This is a minor issue and doesn't seem to affect the overall enjoyability of my approach. I am now looking forward to the winter holidays during which I want to try out my new app while skiing. The next step will be to add more tags to extend to functionality for switching between playlists (one dramatic soundtrack list for skiing and one relaxing list for sitting on the ski-lift).

As a conclusion, I am happy to announce that I have finally found a good use for NFC.