eclipsesource / tabris-plugin-firebase

A firebase plugin for Tabris.js
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Add API to remove delivered notifications #46

Closed patrykmol closed 5 years ago

patrykmol commented 6 years ago

Problem description

Currently it is not possible to remove delivered notifications through an API.

Expected behavior

Developer should be able to remove delivered notifications.

We should provide an API that will allow to remove specific notifications.

patrykmol commented 6 years ago

On iOS this will have to an iOS 10+ feature. Following method can be used to remove notifications: https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/1649517-removependingnotificationrequest?language=objc. It accepts and array of strings which are identifiers for notifications to be removed. This identifier come from native notification object but they are not passed to JS side currently. For iOS I would have to add this identifier to notification data before sending it to JS. This will allow JS developer to specify which notification he wants to remove. I would suggest iosIdentifier as a key for this identifier.

patrykmol commented 6 years ago

After some discussion we have agreed to implement getAll and clearAll methods that will be available on pendingMessages object. pendingMessages will be a property on Messaging object.

mpost commented 5 years ago

The pendingMessages have been implemented on the 2.x and master branch.