notifications.cancelNotification() not working?

Hello

I can’t get notifications.cancelNotification() to work on android.

On iOS it clears all the remote push messages (coming from my app) in the notification center, but on android it doesn’t clear anything.

Anyone else seeing this?

Just wan’t to make sure… before filing a bug report.

Thanks

Let me ask another way…

Does anyone have it working?

It works fine

Have you tried building the notifications sample app and trying that?

Rob

I seem to have the same problem on android, I can clear local notifications but the remotes ones cannot be removed. It works fine on iOS

We are using firebase for sending remote notification.

@Rob: The sample app doesn’t demonstrate this functionality.

I guess I need to describe the problem a bit better.

The app I am working on is a turn based game that sends a lot of push messages. When a push message arrives on the device it is shown in a list in the operating systems notification center. (Android version shown on screenshot)

Screenshot.png

Since we are sending a lot of messages we want to be able to clear the entries coming from our app, when the app is opened. Otherwise the user will end up having hundreds or thousands of messages there… which is very annoying.

The documentation for (plugin.notifications.v2) notifications.cancelNotification() says:

Removes the specified notification (or all notifications) from the scheduler, status bar, and/or notification center.

(…) If no ID is passed, all notifications are cancelled.

We have it working on iOS but on Android notifications.cancelNotification() doesn’t clear the messages in the notification center (for some strange reason local notifications are cleared, so to test this you need to set up remote push)

Thanks

@anon63346430

So you are able to remove notifications from the Android notification center as described above?

If so could you please enlighten me on how to do that.

Let me ask another way…

Does anyone have it working?

It works fine

Have you tried building the notifications sample app and trying that?

Rob

I seem to have the same problem on android, I can clear local notifications but the remotes ones cannot be removed. It works fine on iOS

We are using firebase for sending remote notification.

@Rob: The sample app doesn’t demonstrate this functionality.

I guess I need to describe the problem a bit better.

The app I am working on is a turn based game that sends a lot of push messages. When a push message arrives on the device it is shown in a list in the operating systems notification center. (Android version shown on screenshot)

Screenshot.png

Since we are sending a lot of messages we want to be able to clear the entries coming from our app, when the app is opened. Otherwise the user will end up having hundreds or thousands of messages there… which is very annoying.

The documentation for (plugin.notifications.v2) notifications.cancelNotification() says:

Removes the specified notification (or all notifications) from the scheduler, status bar, and/or notification center.

(…) If no ID is passed, all notifications are cancelled.

We have it working on iOS but on Android notifications.cancelNotification() doesn’t clear the messages in the notification center (for some strange reason local notifications are cleared, so to test this you need to set up remote push)

Thanks

@anon63346430

So you are able to remove notifications from the Android notification center as described above?

If so could you please enlighten me on how to do that.