1

I´ve been reading a lot about NFC, card emulation and etc.... I found two very helpful posts about this issue:

Android and Symbian NFC mobile development questions and answers (FAQ)

http://forum.xda-developers.com/showthread.php?t=1281946

Reading them I realized that it is quite complicated to write an application to make a payment.

Since I just want to see "something" working I'd like to ask the more experienced people if using the patch provided at xda-developers forum (second link above) would be enough just to write an appication that would open some door ou register/authorize someone´s entrance at an event (provided that I have a NFC device to properly interact with my phone, of course).

Thank you all

Community
  • 1
  • 1

2 Answers2

0

In my opinion, you shouldn't bother with trying the patches on XDA Developers, especially if you are considering using Android 4.0 ICS. Android 4.0 already has built-in functionality on the Nexus S and Galaxy Nexus phones to enable card emulation. Drawback: you need a rooted phone to make it all work (see e.g. How to obtain NFCEE_ADMIN permission on rooted phone? for an example of someone succeeding).

A perhaps simpler approach is using NFC peer-to-peer communication ("Android Beam") with an external reader. This can work with any Android NFC device using a simple app to push the necessary data to the reader. Provided the reader support peer-to-peer communication, this is far the easiest solution. It would require some development work on the reader side, though, see http://code.google.com/p/ismb-npp-java/wiki/NppFromPhoneToACR122 for an example of this approach.

Community
  • 1
  • 1
NFC guy
  • 10,151
  • 3
  • 27
  • 58
0

Payment is mostly impossible since you don't have the keys for the JavaCard card manager, better forget about it. Additionally, to write a Visa, etc compatible payment applet, you need access to their specs, which means signing NDAs, paying money, etc.

Apparently the Mifare chip has stock keys, so you can modify it. So if you have a reader, and a device (door, etc.) that uses Mifare cards, you might be able to get it work. The thread also mentions that you might be able to clone your transport card. But:

  • you need to build your own firmware and flash it on a rooted phone
  • you may need to port the patches to whatever is the current GB version (2.3.7) or use exactly the same (old) tag
  • You need to do a lot more reading :)
Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84
  • Yes, to be able to install a JavaCard application inside the Secure Element on a Nexus S or Galaxy Nexus, you need the card manager keys, which are only known to Google. So that route is essentially closed. The "MIFARE chip" is actually a part of the Secure Element that can emulate a MIFARE chip. It is not 100% the same as an actual MIFARE chip and it probably will not have default (stock) keys. That leaves applications that only need the UID. This will only work if the Secure Element does not use a Random ID. – NFC guy Mar 28 '12 at 09:09
  • The thread you linked that it's using the default keys. I haven't actually tried it though. All in all, NFC in Android is a big letdown. Currently it's only a toy, and Google Wallet hasn't picked up (and probably won't). – Nikolay Elenkov Mar 28 '12 at 09:12
  • NFC encompasses a number of modes: card emulation (used by Google Wallet; 3rd party developers have no access to it, due to how access control to the Secure Element is done), peer-to-peer (Android Beam; more and more apps provide support for this and it is potentially a powerful way for users to share information and content and very easy for developers to use), and card reader/writer (the technology classes such as IsoDep use this; apps can use this to read the contents of contactless cards, such as used for public transport and payment, most apps are only available in a certain region). – NFC guy Mar 28 '12 at 20:19
  • Android Beam is a toy, peer-to-peer is limited to a single message. Reading your transit cards certainly works, but that's it. As I said, NFC in standard Android is merely a toy. – Nikolay Elenkov Mar 29 '12 at 00:53