Frank Pena
Frank Pena

Reputation: 111

Expo addNotificationResponseReceivedListener doesn't work

this is my code:

React.useEffect(() => {
  
    const subscription = Notifications.addNotificationResponseReceivedListener(response => {
      console.log(response)
  
    });
    return () => subscription.remove();
  }, [navigation]);

What I expect to happen is that when the user clicks on the notification, the console.log is triggered, but nothing happens

I don't know if this is an issue with expo SDK 38

Upvotes: 1

Views: 2927

Answers (2)

Kranthi Alluri
Kranthi Alluri

Reputation: 81

I had the same issue. I was on SDK 39.

Problem was resolved once I upgraded to SDK 40.

Link to github issue: https://github.com/expo/expo/issues/9866

Upvotes: 1

Frank Pena
Frank Pena

Reputation: 111

I could solve the problem:

I was using this listener in development mode in a Samsung Galaxy s7 Edge and didn't work. But when I published the APP in the play store this listener was working fine!

Upvotes: 0

Related Questions