2
votes

I am developing an nfc application for Android and would like to deal with a tag that can support either NFC-V or NFC-A protocol.

The problem is that when I approach the tag with my phone (Galaxy S2 plus, running android 4.1.2) it detects the NFC-V protocol 90% of the time, and the NFC-A protocol 10% of the time.

What I would like to do is force my phone to only pay attention to one of the two protocols. This mean I would like to configure my phone before touching the tag to only listen to the NFC-V protocol for example.

Is this possible?

2

2 Answers

1
votes

This is unfortunately not possible.

The NFC hardware time-multiplexes all the different protocols. If you put your tag near the antenna, and the NFC-chip is currently sensing for for NFC-V you will get NFC-V. Same with NFC-A.

0
votes

Since Android 4.4 this is possible using the Android NFC reader-mode API:

NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
nfcAdapter.enableReaderMode(this, this, NfcAdapter.FLAG_READER_NFC_V, null);

You could then retrieve the Tag object through the reader-callback:

public void onTagDiscovered (Tag tag) {
    ...
}