zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.77k stars 2.05k forks source link

RNIntentHandler documentation not clear about notification.data #2304

Closed Aure77 closed 1 year ago

Aure77 commented 2 years ago

In RNIntentHandler documentation, it's say that getBundleFromIntent "should return the bundle data that will be serialized to the 'notification.data'" but in fact Bundle returned become the object sent to the onNotification() handler. So if no "data" bundle key is present, no data block is created as suggested in documentation.

Is it the expected behavior or there is something missing ?

Example of bundle returned in getBundleFromIntent in my case: Bundle[{google.delivered_priority=high, google.sent_time=1662137474741, google.ttl=2419200, google.original_priority=high, msg=Test PUSH, from=123456789, title=Test PUSH , google.message_id=0:112345667, customId=abcd, com.batch={"r":{"dmi":60,"dma":3600,"m":1},"t":"t","od":{"di":"a-b-c-d","ak":"ANDROID","n":"e-f-g-h"},"i":"something","l":"deep://link"}, google.c.sender.id=123456789, android.support.content.wakelockid=2, collapse_key=default}]

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.