coconauts / NotificationListener-cordova

NotificationListenerService plugin for Cordova/Phonegap
Other
37 stars 28 forks source link

Not working #10

Open arjunmenon opened 6 years ago

arjunmenon commented 6 years ago

Hey I am using this in Andoird 6.0 I have granted access to Notification Access

But I dont receive any notifications

Here is the ADB log - https://paste.ubuntu.com/p/xxwTFyKZ9P/


.
.
onDeviceReady: function() {
    console.log("Notification listener " +JSON.stringify(notificationListener));
    setNotificationListenerCallback();
}
.
.

var setNotificationListenerCallback = function(){
  notificationListener.listen(function(n){
    console.log("Received notification " + JSON.stringify(n) );
  }, function(e){
    setTimeout(setNotificationListenerCallback, 1000);
    console.log("Notification Error " + e);
  })
}