Getting started with NFC on Android

NFC or “Near Field Communication” is a technology that allows wireless close-proximity data communication between things like phones, stickers and cards. If you’re familiar with Barclays PayWave or the Oyster Card, you’ll know that the technology this is built on, “RFID”, allows data to be read by simply touching things together. You might touch a phone against stickers, posters and with NFC, other phones. This action can be used to launch a website or an app, make a payment or even transfer data in both directions (on Android the latter is called Beam). When compared to QR codes, NFC provides a far simpler (and built-in) mechanism for opening URLs, downloading apps, or even reading and writing custom content.

In this tutorial we’re going to build an app that writes to NFC tags, and also reads Top Trumps-like data from them for a retro console game. If a user without our app touches the tag, it’ll use a built in mechanism to take them to the download page for the app in the Android Play Store. Once installed any subsequent taps will launch the app and show the game card on screen. All in less than 200 lines of code!

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

TOPICS

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.