Sunday, 15 April 2012

Llamas near fields

I've managed to borrow a phone with NFC support from my real-life job and I've been toying with it over the weekend. The Llama at the end of this blog post now has NFC support. You can place your phone near an NFC tag and get it to do stuff! Consider this a very early implementation. I'll never be able to use this in the real world, so you should let me know how it performs.

To use it, you add the 'NFC tag detected' condition to an event. Llama will then tell you that you need to place your phone over an NFC tag, such as your Oyster card if your a Londoner like me. You can then give the tag a friendly name. Then add other conditions and actions as normal.

The NFC tag detected condition is a trigger only. At all other times it will evaluate to false. This is because Android doesn't tell Llama when a tag disappears, only when it is first seen. It may be possible to periodically attempt to write to a tag to detect its presence, but I haven't had a chance to implement that yet.


  • Llama can now detect NFC tags!

This is a very early build that I haven't been able to test much, so you really really should export your Llama data before installing it. I've tested it in the emulator running Froyo (which lacks the NFC APIs) and it didn't crash, but who knows.