Is there a way to rollback the notification request placed to GCM server?
As in, consider a GCM-message-request is placed to GCM server.
If the user sees the message in web before coming online in mobile, the GCM request should be rolled back. And user should not see the notification in mobile.
There is no built in mechanism for such rollback in the case you describe. You can try implementing it yourself - when your server notices the message was viewed in web, you can send another GCM message to the device with some data that represents a need to rollback. When you process that message, you should clear any notifications that were created by your app on that device (I'm not sure if that's possible, you'll have to check).
There is such a mechanism in a similar case - if the user has multiple Android devices, and you send a GCM message to all of them (using the new user notifications feature), once the user views the notification on one device, it would be automatically removed from the other devices.
- If a message has been handled on one device, the GCM message on the other devices are dismissed. For example, if a user has handled a calendar notification on one device, the notification will go away on the user's other devices.
- If a message has not been delivered yet to a device and but it has been handled, the GCM server removes it from the unsent queue for the other devices.