Janis Peisenieks
Janis Peisenieks

Reputation: 4988

Retrieve NFC Id in Android P2P

As far as I know, every NFC Tag has a unique Id. I assume, that each NFC enabled phone's chip also has a unique Id.

When taping 2 phones that have NFC enabled together, is it possible, that a phone with a specific application gets the NFC id of the other phone, that has no extra applications installed for this purpose?

The documentation mentions none of this, and the resources available on the internet seem to say the same. I would just like to get the final yes/no/nobody knows.

Upvotes: 0

Views: 748

Answers (1)

NFC guy
NFC guy

Reputation: 10228

In case of an Android app receiving an Android Beam intent, that intent will contain a "fake" Tag object. Although you can call the getId() method on that object, you will not obtain the ID of the NFC peer-to-peer device that sent the Android Beam message.

But even if you could get at the other device's NFC ID (you are correct: it has one), it will not be of much use. Usually (depending on the NFC chip) this ID will be randomly generated and will be different each time the phones connect over NFC.

Upvotes: 1

Related Questions