I have a Nexus S with NFC and the Android API and such.
I assume that NFC isn't simulated via the emulator (?).
And I only have the one NFC enabled phone.
Can I use RFID cards to test NFC apps I make? Or will I have to get another NFC enabled phone?
Thanks
NFC has two different modes: card reading/writing and phone peer-to-peer communication. Testing card reading/writing functionality in your NFC app generally requires real cards. In some cases, when the card contains a so-called NDEF-formatted message that is automatically read from the card by the Android OS and delivered to your app in an Intent, you could test or simulate this by generating the corresponding Intent yourself. In Android, peer-to-peer mode corresponds to Android Beam. Receiving an Android beam message in your app works the same as detecting an NDEF message from a card: Android delivers the NDEF message in an Intent to your app. For all means and purposes, the Intent is virtually the same as the one delivered from a card containing the same message. So receiving an Android Beam message can be simulated using a card (assuming the card's memory is large enough to store the message). For testing the sending of an Android Beam message, I cannot think of any other way than using a second phone.
This may also be of some help to you.
FakeTagsActivity — A activity that launches tags as if they had been scanned. This is useful if you don't have access to NFC enabled device or tag.
http://developer.android.com/resources/samples/NFCDemo/src/com/example/android/nfc/simulator/FakeTagsActivity.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With