Ad

Implementation Of WhatsApp/Telegram Like Calling Feature In Flutter

How can I implement WhatsApp/Telegram like call notification when the flutter app is in the background or cleared from the recent task (clearing ram)? Can anyone let me know Exactly How to do this?

Ad

Answer

There is a great youtube series on this exact topic. In the series, a YouTuber by the name of the CS Guy creates a clone of Skype. I've placed the link to the video where he explains how to create a pop-up screen when a user calls another user, however, you may need to watch the previous videos within the series in order to get everything working. Its quite long but I recommend you watch the entire thing. In terms of displaying notifications when a user is called, I recommend you watch a video by Fireship listed below. In the video, he explains how to send notifications in the background when a certain event occurs in Firestore.

I can't explain the entire process in detail to achieve what you want but I can give a general overview of what you would need to do.

  1. Watch the video/entire series by the CS Guy and complete everything
  2. Learn how to send push notifications in firebase from Fireship
  3. When a new document is created within the calls collection (You will understand once you finish the cs guy series) trigger cloud function.
  4. Find the uid of the receiver of the call within the cloud function and grab the user's token from Firestore.
  5. Finally, send a notification to the receiver telling them about the incoming call.

CS Guy: https://youtu.be/v9ngriCV0J0

Fireship: https://youtu.be/2TSm2YGBT1s

I have done the exact same thing in my application and can help you out if you need further assistance, however, please go through both videos/series first.

Ad
source: stackoverflow.com
Ad