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

Added remove all listeners function #26

Closed lukefanning closed 8 years ago

lukefanning commented 8 years ago

Added a removeAllListeners() func so we can properly clean up in componentWillUnmount()

zetavg commented 8 years ago

Looks good! But since this project has no automatic tests, are you sure that the functionality is working as expected?

In addition, it will be nice if you can add some introductions for this function in README.md by the way, probably in the handle-notification-click-event section.

lukefanning commented 8 years ago

I've not had any issues using this function while using your module alongside react-native-gcm-android. I have generated notifications while the app is in the background, from the app being closed/killed and while the app is in the foreground ok.

fender commented 8 years ago

@lukefanning Great, I need this too. @Neson can we merge and have a new release? Thanks for the great module!

zetavg commented 8 years ago

Ok, merged! And thank you for improving the code.