random09
random09

Reputation: 31

Forcing an NFC scan on Android

I was just wondering if it was possible to force a scan for NFC tags on Android and how to do it. I want to know if I can call something like nfc.scan() and have it return the tag info if there is any tag detected. I am kinda new to this Android thing and so far I have only seen it done with intents.

Upvotes: 3

Views: 513

Answers (1)

Michael Roland
Michael Roland

Reputation: 40831

No, Android does not allow you to trigger a scan for NFC tags/devices in range.

In fact, Android continuously polls1 for tags while the screen is on (and unlocked) and there is no currently detected tag. Thus, you can register your app to be informed when a new tag is detected -> this is done through intents.


1) Most Android devices employ some energy saving mode that prevents the device from continuously polling for all kinds of tags. Instead, these devices detect tags by sending a short impulse and measuring detuning effects from inductive coupling.

Upvotes: 3

Related Questions