invertase / notifee

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

feat(android): Support data param in notification #1141

Open aureosouza opened 2 weeks ago

aureosouza commented 2 weeks ago

Fixes: https://github.com/invertase/notifee/issues/1081

This fix avoids the need of sending a second data-only notification, in a similar behavior as iOS. More info on firebase data payload here.

Based on discussions from https://github.com/invertase/notifee/issues/393#issuecomment-1120260319 and using similar solution as here we are injecting the data param on the method getDisplayedNotifications.

Obs.: firebase needs to inject the data param as well, for this we added a handleIntent override for the class that extends FirebaseMessagingService, further PRs will be necessary on firebase side. In case of react-native-firebase there is more info here.

CLAassistant commented 2 weeks ago

CLA assistant check
All committers have signed the CLA.