Notification handling not trigger when app is closed

Not trigger push notification handling event not fire when app closed. its only fire when app is focus

Standalone app builded
Platform: Android
ExpoSDK: 41
Using FCM
“expo-notifications”: “~0.9.0” i try lastest version 0.11.6

I did try;

  1. added update:true in app.json
  2. added experienceId in notifications payload data
  3. added “useNextNotificationsApi”: true in app.json
  4. used addNotificationResponseReceivedListener and addNotificationReceivedListener in useEffect
  5. used addNotificationResponseReceivedListener and addNotificationReceivedListener outside function component.

is thats bug ? or what can i do ?

Hey @ajusagmar, can you elaborate on the flow that is happening here? If the app is closed (killed) and the user does not interact with the notification, then no response will be triggered and this is expected. Please see the table here for expected behaviors: Notifications - Expo Documentation


Thanks for reply

The scenario I want to do
App state is closed (killed)

  1. Send remote push notification
  2. Recieved notification
  3. Click notification
  4. Navigate to details screen

I can’t handle to the notification clicking.
i need to navigate to detail screen with using in notification data
How i do ?

I used to have this problem. But I rebuild after Dec 17, 2020 - expo/expo#11343 (comment) and it fixed.

@ noitidart I tried rebuild. but not work for me. Could you please share your working example code.

Are you testing in development? While in local development I don’t think it ever works you have to make stand alone build for it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.