This is a known bug.
NotificationListenerService gets killed during app updates and sometimes even randomly and it isn't restarted automatically. Further, it can't even be started manually but we have to prompt the user to reboot the device, since the service only seems to be able to be started on device boot.
The following doesn't work (trying to start the service manually):
startService(new Intent(this, NotificationService.class));
Are there any workarounds for this? I need the service to be constantly running and getting the OnNotificationPosted events.