• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NFC

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am interested in writing an app which uses NFC - does your book feature this technology?

Thanks,

Frank
 
Author
Posts: 25
5
Android IntelliJ IDE Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank -

Yes, the basics of NFC communication between two Android devices is covered. There are two primary ways to transmit data, using the basic NDEF push mechanism (this is how you read tags and has been around since Android 2.3) or the newer "Android Beam" APIs. The Beam APIs are more used for sharing data between two devices, and allows the process to start over NFC, but complete over Bluetooth or WiFi Direct. This allows you to share larger files like media between two devices, which would not really be possible to transmit completely over an NFC channel.
 
Frank Daly
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much Dave. If I don't win a book in this competition I'll definitely buy your book. I'm hoping to also write an application using NFC to read a MiFare classic chip. I've googled this and have come up with some useful links but none that i've managed to successfully implement in my own application - have you any advice for writing such an application?

Frank
 
D. Smith
Author
Posts: 25
5
Android IntelliJ IDE Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frank -

I think one key to remember is that the Android Tag Dispatch system really only supports the NDEF data format when working with smart tags. So it's not entirely specific to the fact that the tag hardware be compatible with Android as the data you write to the tag be in the correct format. The MiFARE Classic is made by NXP, and NXP also has an app on Google Play that you can use to ensure you write proper data to your tags. So I would make sure you have that application to begin playing around with your tag before writing any code: https://play.google.com/store/apps/details?id=com.nxp.nfc.tagwriter

The second piece of information I would point you to would be the Android documentation on the Tag Dispatch System, which will hopefully provide some more context from the framework about how to parse and interact with the NDEF records on your tags. This should provide some more detail about how your application needs to register with the systems so that it knows to forward the data found on certain NFC tags to your application for processing: https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#tag-dispatch
 
Frank Daly
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many thanks again Dave
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic