react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

how do i know when to click to notif and when to receive notif from GCM ?

Open hoangpm2812 opened this issue 8 years ago • 3 comments

Hi, at function onNotification i dont know how to separate between local notif is opened or received. For example, when i receive a message from GCM, i will call function locaNotification to show notif from server. But when i press that notif, it will call function localNotification again a the new notification will be shown again and again... Please help me.

Thanks.

hoangpm2812 avatar Nov 20 '18 08:11 hoangpm2812

because onNotification was Called when a remote or local notification is opened or received

noce30 avatar Nov 21 '18 11:11 noce30

you can check userInteraction attr in message. true for click action and false for receive event.

mrminhhuy avatar Dec 14 '18 04:12 mrminhhuy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 22 '20 00:05 github-actions[bot]