Notifications.addListener is not firing up in useEffect - Android

In “Notification” section, in lesson “8- Handling Received Notifications” I have code like below ↓

useEffect(() => {
registerForPushNotifications();

Notifications.addListener(notification => console.log(“notification”, notification));
}, );

It seems that it is correct (The same code as Mosh). But it doesn’t work.

Also, I noticed that is a bigger issue overall → link

1 Like

I’m experiencing the same issue. Notifications arent logging to the console and on tapping the notification, navigation to the Account screen does not happen either.

Checked out the Notifications expo docs and addListener is not listed as one of the methods there…

Please update if someone finds a fix :slight_smile:

Change Notifications.addListener(…) to Notifications.addPushTokenListener(…)