0

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.

Rishabh
  • 29
  • 1
  • 7
  • Providing an answer for this post would be *too broad*. One thing I would suggest tho is for you to use Firebase Realtime Database instead. The behavior you mentioned seems critical, which I believe isn't suitable for FCM. – AL. Apr 11 '18 at 17:07
  • @AL.Thanks. I am already using firebase realtime database to keep track of available drivers and their information. How do you suggest to use it instead of GCM ? As driver and rider app will have separate app. – Rishabh Apr 12 '18 at 17:18
  • Firebase Realtime DB gives you the option to exchange data quickly, even between different apps. FCM is mostly used for Push Notifications, which is like an add-on feature. App critical features such as what you mentioned would improve if you use RTDB. – AL. Apr 12 '18 at 17:43

0 Answers0