How to notify user about incoming call to callee in webRTC?

239

As you are already using firestore or firebase real-time database as a signaling medium you should use firebase cloud messaging to notify users about the calls.

You can yous firebase cloud functions for the same. Where by detecting changes in the database you can send notifications to users.

Link for the cloud function part

Share:
239
Admin
Author by

Admin

Updated on December 30, 2022

Comments

  • Admin
    Admin about 1 year

    My app needs a functionality of internet call so I planned to use webRTC and using firebase as signalling server.

    In this feature caller is interested in calling the callee. But in webRTC the user needs to use the code to answer the call by send sdp and ice candidate.

    But the problem for me is how to notify the user about the incoming offer call. Can I use FCM for notifying the user?

    What are the other ways of notifying the user?

  • Admin
    Admin almost 3 years
    In that how can I send it to a particular person I use my own server. By using email for specifying Firebase can recognize the specific device?
  • Kathan Patel
    Kathan Patel almost 3 years
    Store the user's fcm token of the specific device when the device registers for the first time with the server. And then use that token to send a notification to a specific user. Tip: To make it look like a call use a data notification from firebase which will not trigger a notification in the user's device but will give you an event in your service. So from there you can trigger a call like UI and make it look like that you are actually getting a call from another person.
  • Admin
    Admin almost 3 years
    Sorry to screw you Kathan. How can I get the FCM token for a specific device?
  • Kathan Patel
    Kathan Patel almost 3 years