Skip to content Skip to sidebar Skip to footer

Catch Nfc Ndef_discovered Intent From A Service

I have a service which is always running in the background, is there a way that I can catch an NDEF_DISCOVERED intent filter in my service? So that once my two devices are ready to

Solution 1:

The NFC intents, that is

  • android.nfc.action.NDEF_DISCOVERED,
  • android.nfc.action.TECH_DISCOVERED, and
  • android.nfc.action.TAG_DISCOVERED,

are only sent to activities. Thus, you cannot catch them from a service directly. However, you could let the intent launch an activity, which then invokes the service.

Post a Comment for "Catch Nfc Ndef_discovered Intent From A Service"