Expo-notifications notification event don't work if app is not running in the background

Viewed 115

Expo sdk: 40

responseListener.current =
    Notifications.addNotificationResponseReceivedListener((response) => {
      axios.post("https://<logUrl.onOurServer.com>", {
        test: "background",
      });
    });

addNotificationResponseReceivedListener // dont work when app's not running

This method sends me a notification mail when app is running but if the apps is not running, I can't capture this event from a cold start. Is there a permission or something for this to work? I've just copy pasted the code from https://docs.expo.io/versions/latest/sdk/notifications/ and just added logging to a https endpoint, it does not work on cold start.

0 Answers
Related