VISHAL RANA
VISHAL RANA

Reputation: 21

Remove firebase notification from android device (sever side)

I am using firebase for notification. I want to send notification to the group of users... If any one of them press accept notification action button then, the same notification must be remove from the other users device. Is it possible to do using firebase.

Ex. I want to send notification to 5 delivery boys for collecting parcel from XYZ place, if any of them accept the collecting parcel order notification then the same notification must be remove from other 4 delivery boys autometically.

I study and practically done an example of https://firebase.google.com/docs/cloud-messaging/android/device-group Notification send to all 5 del. boys but notification still there after accepting the collecting order. Please, help.

Upvotes: 1

Views: 1904

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 600110

Firebase Cloud Messaging has two distinct types of messages:

  1. Notification messages that are handled and displayed by the OS when the app is not active, and handled by your application code when the app is active.
  2. Data messages that are always handled by your application code, which can then choose to display or update UI notifications as needed.

What you're describing sounds like you want to use data messages only, and then use Android's notification UI/API to display, update, or hide a notification.

Upvotes: 2

Related Questions