React-native-push-notification: OnNotification and onAction is not getting fired

Created on 20 Jul 2020  路  7Comments  路  Source: zo0r/react-native-push-notification

I have tested local notification with the example provided but when i clicked on Action button nothing is getting fired.
Please anyone help me in this matter.
Thank You

Most helpful comment

I am facing the same issue onaction is not getting fired. but notification is working fine.

All 7 comments

Hi
Did you test the example project ?
Did you put .configure() outside of any component ?
Did you look at the actions documentation?

Yes, I have tried all that,but it did not work

Did you test/run the example project?

Since it's working in it, you probably have an issue in your configuration.

Hi @Badal1234
Have you set invokeApp attribute to false?

I am facing the same issue onaction is not getting fired. but notification is working fine.

also me, but when i press the notification it fire onNotification event

edit:
as a workaround i catch the userInteraction property as replacement of onAction

onNotification: function (notification) {
        console.log('NOTIFICATION:', notification);
        if (notification.userInteraction) {
          // onAction replacement here
          props.navigation.replace('HomeStack');
        }
      },
Was this page helpful?
0 / 5 - 0 ratings

Related issues

edwinharly picture edwinharly  路  3Comments

sungjinoh picture sungjinoh  路  3Comments

cookienawer picture cookienawer  路  3Comments

NiuQiaoling picture NiuQiaoling  路  3Comments

GastonEDiaz picture GastonEDiaz  路  3Comments