In version 0.7.0 using notifee.onBackgroundEvent (android) will cause issue "registerHeadlessTask called multiple times for same key" because of this:
https://github.com/notifee/react-native-notifee/blob/230de447fd8da14b7aca051239eaf6a03013c4c5/src/NotifeeApiModule.ts#L31-L41
I guess it was some bad refactoring because previously it was like this:
https://github.com/notifee/react-native-notifee/blob/34152365077b5e342a43d26a0cd1768e641124b0/src/NotifeeApiModule.ts#L35
Where FOREGROUND_NOTIFICATION_TASK_KEY key is "app.notifee.foreground.task".
I confirm this symptom (haven't checked the analysis here yet - but looks thorough - thank you @nvojnovic !)
Maybe it will need more refactoring but I think this pull request should fix current issue.
Thanks for the PR, merged and released in 0.7.1
Should be closed after merge of #83
Most helpful comment
Thanks for the PR, merged and released in 0.7.1