Notification listener not working for Android in react native expo app

908 views Asked by At

I have implemented react native expo Push notifications but while handling the notifications ,the listener doesn't get trigger for Android when I click on notification ,same code get triggered for incoming notification in IOS , below is the code I have added for handling notifications

    ```Import * as notifications from 'expo-notifications';

       const backgroundSubscription = 
       Notifications.addNotificationResponseReceivedListener(response=>{});

       const foregroundSubscription = Notifications.addNotificationReceivedListener(notification=> 
       {});

        return()=>{
        backgroundSubscription.remove();
        foregroundSubscription.remove();
        };```

Code is working fine for iOS and doesn't work for Android. When I click on notification I want to navigate to specific screen in my app , anyone please provide some update that why it's not working for Android.

I have given link for expo's documentation that I followed.

https://docs.expo.io/versions/latest/sdk/notifications/`enter code here

0

There are 0 answers