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 to make notification uncancellable/unremovable? #52

Open prtkkmrsngh opened 8 years ago

DarrylD commented 7 years ago

I too wonder for a stay-alive feature

Batistleman commented 7 years ago

I think we should implement 'ongoing':

http://stackoverflow.com/questions/13427204/non-removable-notification

Batistleman commented 7 years ago

I think the fix should be quite easy:

adding

.setOngoing(attributes.ongoing)

right after this line: https://github.com/Neson/react-native-system-notification/blob/master/android/src/main/java/io/neson/react/notification/Notification.java#L128

(and possibly also setting the default value)

Batistleman commented 7 years ago

I created a pull request, in my setup it works perfectly, please give it a try.