Cancelling/Replacing Notification when app Inactive

Hi guys,

I am trying to eliminate flooding a user’s notification, where I would like to cancel (or maybe replace) the old notification with an updated notification. It is something like the GCM ‘collapse_key’ ( http://developer.android.com/design/patterns/notifications.html ).

I notice that when the app is inactive, none of the app’s notification listener is running (not in background). So without this, i am unable to call ‘system.cancelNotification()’ and replace it with a local notification.

Is there a way to cancel/replace/stack a notification if the app is inactive ?

Thanks!