I work with a contactless reader to communicate with my Android device.
I noticed that at any given time, I cannot connect to my Android device using P2P. If I want to connect to initiating an Android Beam transfer, I must constantly try to connect to the device several times in one second period.
An Android NFC device can detect proximity cards, NFC P2P targets, and NFC P2P initiators, i.e. 3 different modes. I'm starting to think that behind the scenes there is some kind of poll that quickly switches between the three modes.
This means that at any time when I try to connect to the phone, it may or may not be in the correct mode and it will work. This is why I need to make some connections.
I was looking for an Android source to try to figure this out without real luck. here is the most promising file I've seen, but it still doesn't make sense.
My question is: how does Android detect several NFC modes, does it use a switching algorithm, and if so, what is the specificity of the algorithm?
Thanks.
conor source share