skip to Main Content

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?

2

Answers


  1. You can use the flutter_local_notifications plugin with the firebase_messaging plugin.

    From the documentation of the flutter_local_notifications plugin;

    • [Android] Support for the following notification styles

      Big picture

      Big text

      Inbox

      Messaging

    From the documentation of the firebase_messaging plugin;

    With this plugin, your Flutter app can receive and process push notifications as well as data messages on Android and iOS.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search