1

Is it possible to disable the NFC adapter immediately after a scan within millisecs? I want to prevent duplicate scans of the same tag. I have proved though testing that the same tag can be scanned twice within millisec by hovering the phone over a tag.

I've looked at the NFC api but can't see anything that disables the adapter. My app uses the NFC statically so i don't actually use an instance of the NFC adapter class but i would change my if i could reap the benefits of disabling the adapter.

turtleboy
  • 8,210
  • 27
  • 100
  • 199

1 Answers1

0

Since you can turn it off in the system settings I would assume there should be a way to do it. It should look something like myAdapter.disable or myAdapter.disable(something) Or try this:

http://developer.android.com/reference/android/nfc/NfcAdapter.html#disableForegroundDispatch(android.app.Activity)

Ryan Sayles
  • 3,389
  • 11
  • 56
  • 79
  • thanks, but i've just noticed you need api 10 for this and the app must be targeted at api 8, so no good. Thanks anyway! – turtleboy Jul 18 '13 at 12:22