invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.88k stars 228 forks source link

notifee.getInitialNotification always returns null on fullScreenAction #929

Closed ondrejnedoma closed 10 months ago

ondrejnedoma commented 11 months ago

My goal is to implement an alarm functionality into my app, triggered by an FCM message. I had 2 possible approaches

  1. Use the mainComponent prop of the fullScreenAction, which worked almost perfectly, except that if the app wasn't in a quit state, but in a background state, upon re-opening, the component doesn't change (because the bit of native code only runs when the app is freshly opened)
  2. use notifee.getInitialNotification() in a useEffect of the app component, which sadly lead my to this bug

This method always returns null when it's triggered by a fullScreenAction, but it works as expected with a pressAction.

ondrejnedoma commented 11 months ago

I solved this by using a completely different activity rather than just a different component, doesn't change the fact that this should be fixed though.

github-actions[bot] commented 10 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.