React-native-notifee: registerHeadlessTask called multiple times for same key

Created on 8 Jun 2020  路  4Comments  路  Source: notifee/react-native-notifee

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".

Android bug needs-review

Most helpful comment

Thanks for the PR, merged and released in 0.7.1

All 4 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trbsi picture trbsi  路  5Comments

Jomik picture Jomik  路  13Comments

hmazer picture hmazer  路  4Comments

michorvath picture michorvath  路  4Comments

joshuacano picture joshuacano  路  6Comments