invertase / notifee

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

[Android] onForegroundEvent or onBackgroundEvent not triggering when clicking push notifications #1044

Open LuckyMadu opened 4 months ago

LuckyMadu commented 4 months ago

I must navigate to a specific screen based on the data object information. iOS is working fine for this issue.

 "react-native": "0.72.0"
 "@notifee/react-native": "^7.8.0"
notifee.onForegroundEvent(({ type, detail }) => {
    if (type === EventType.PRESS) {
        // access data
    }
  });

Below is the Postman payload to send the push notification.

{
    "message": {
        "token": "xxx",
        "notification": {
            "body": "Welcome to management",
            "title": "Welcome"
        },
        "data": {
            "id": "12345",
            "type": "Document"
        }
    }
}
github-actions[bot] commented 3 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.

Gautham495 commented 2 months ago

Having the same issue suddenly. It worked before for me. Please fix this.

github-actions[bot] commented 1 month 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.

Eclipses-Saros commented 2 weeks ago

not stale

check https://github.com/invertase/notifee/issues/621#issuecomment-2342711032