zetavg / react-native-system-notification

Android system notifications for React Native. Supports push notifications with GCM integrated.
https://www.npmjs.com/package/react-native-system-notification
244 stars 102 forks source link

how does the app reload when notification is pressed #36

Open CodeoLTD opened 8 years ago

CodeoLTD commented 8 years ago

I try to use the press event to navigate to another page according to the notification but the app seems to always load the same main page no matter how I try to change it any help would be invaluable, thanks

hyperh commented 8 years ago

+1 Same issue here.

The Notification.addListener('press', function (e) {... works fine if the notification is received while the app is in the foreground. But I need it to work when the notification is received and the app is in the background and the user clicks on it.

varungupta85 commented 8 years ago

+1

I am observing the same issue that when the app is in background and user clicks on the notification, the app is reloaded causing the app to retrieve network data again and re-render it. Has someone been able to get around this issue?

varungupta85 commented 8 years ago

CC @Neson

Some additional information. If I try to schedule a local notification on Android using package react-native-push-notification, the app doesn't reload when I click on the notification. I am using the same handler for handling the notification once it is received in both the cases. So, it is not the part when the notification is handled which is the problem but the problem seems to be how the notification is scheduled. I haven't done any native android development as such. So, I am not sure where to look. If somebody can provide some pointers, I don't mind investigating it further.

The reason I am not able to use react-native-push-notification package is that it doesn't support various other features that this package supports such as cancelling a notification, playing custom sound for the notification etc.

rimzici commented 7 years ago

Hi Team, Thanks for the module.

same issue. app is reloading everytime on clicking the notification in the tray. resulting in creating notification again. launching app , that is running in background by clicking on notification tray, not detecting the "press" event. have someone solved any of these issues. please help Thanks in advance