Remove push notification when app opens (DEF-2501)


#1

I have next case:

  • for example I have few notifications in my bar (notification already received by user).
  • user starts app using icon on desktop (not from notification).
  • when user close application - the notifications still in notification-bar.

I checked few other games (some of them send really many notifications). And all of them remove all recieved notifications when I opened the app.

In my defold game I try to use
push.cancel

But it has no effect to already recieved notifications.

How I can to remove already recieved notifications from notification-bar when application starts?

UPD: I checked this issue only on android


Can you make Defold Extensions open source?
Teaser Fridays and Roadmap talks
Getting notifications when an application working
#2

Hmm, I thought maybe we had a ticket for this in our issue tracker, but I couldn’t find one. @sven is the man when it comes to push notifications. @sven, can you provide some input here?


#3

Hi!

Currently there is no way from inside Defold to cancel notifications that has been displayed (you should be able to cancel any pending notifications with push.cancel however). But as you pointed out, if other games usually clear this list if when the game is started, we should look into having similar functionality. I’m adding an issue for this: DEF-2501