around this issue It mostly depends on your requirements. When you register an IntentFilter in the manifest, you specify an Activity that will be started and given the detected tag data in the Intent. This means that your app can be started at any time to handle the tag. For instance, the user can be on the launcher and hold a tag to their phone, and have your app as an option to handle the NFC detection event. However, assume you have a scenario where it only makes sense to detect the tag while your application is in the foreground. For instance, maybe your app requires the user to be logged in in order to do something with the tag data. In that case, you can use the foreground dispatch mechanism, and start it from any of your Activity classes to receive a result only when your app is active.
NFC using foregroundDispatch in react-native and android
By : ADB
Date : March 29 2020, 07:55 AM
Does that help I ended up adding creation of pending intent and adding of tag/NDEF filters to MainActivity. Then onNewIntent parses the relevant data and relays it to js via