Reputation: 9
I'm trying to read a nfc tag in the background and then save the read message in a file. However, the only way i found is having an activity on top. I also tried with a service but the NfcAdapter cannot directly communicate with android services using ACTIONS.
Upvotes: 0
Views: 310
Reputation: 10228
Only Activities can receive NFC intents. There is no way for a background task or a service to receive them. This is an intentional design choice, I think. It always gives the user full control, just like with the Android Beam screen that the user has to tap before any data is shared over NFC.
Upvotes: 1