Android NFC tag received with broadcastreceiver

前端 未结 2 1415
慢半拍i
慢半拍i 2020-12-16 17:46

I\'m trying to catch NFC tag in broadcast receiver so I wrote a simple BR that prints \"asd\" in the onReceive(). In the manifest xml it\'s desribed like that:

2条回答
  •  暖寄归人
    2020-12-16 17:56

    You could write a small activity that doesn't show any UI at all, sends a broadcast message and then ends with finish(). Using flags in the manifest you can avoid it showing up in history or in recents and being faily invisible, hopefully getting a similar effect to that you desire with the braodcast receiver.

提交回复
热议问题