Firebase GCM to multiple devices one after another

43 Views Asked by At

I am currently working on taxi dispatch system. I have implemented the notification to driver using Firebase GCM. But i am only able to send the request to one driver using topic as broadcast could not be used (if multiple drivers accept the request). Could someone please suggest how can i implement a mechanism where if one driver rejects request it goes to next nearest driver till 3 drivers.

One possible solution i have thought of is to keep track of nearest 3 drivers and sending the request to first one and inside firebase messaging service tracking the response from driver. If its rejected using local broadcast sender/receiver send the request to another and so on.

0

There are 0 best solutions below