Describe the bug
I would like to make an app that periodically reads NFC tags in the background.
When it goes into background execution the NfcManager part is not executed.
To Reproduce
This is the part of code that we call when a button is pressed. It works when the app is on the screen, when we hide the screen, the part of NfcManager doesn't run. No error appears.
if (hasPermissions) {
final backgroundExecution =
await FlutterBackground.enableBackgroundExecution();
ValueNotifier resultBro = ValueNotifier(null);
if (backgroundExecution) {
print("SONO IN back, BRO");
timer = Timer.periodic(Duration(seconds: 5), (Timer t) async {
Duration tagtimer = Duration(seconds: 3);
resultBro.value = null;
Describe the bug I would like to make an app that periodically reads NFC tags in the background. When it goes into background execution the NfcManager part is not executed.
To Reproduce This is the part of code that we call when a button is pressed. It works when the app is on the screen, when we hide the screen, the part of NfcManager doesn't run. No error appears.
if (hasPermissions) { final backgroundExecution = await FlutterBackground.enableBackgroundExecution(); ValueNotifier resultBro = ValueNotifier(null);
if (backgroundExecution) {
print("SONO IN back, BRO");
timer = Timer.periodic(Duration(seconds: 5), (Timer t) async {
Duration tagtimer = Duration(seconds: 3);
resultBro.value = null;
}
Smartphone: