androidflutterandroid-notificationsflutter-notificationflutter-webrtc

Persistent Meet-like Flutter notifications for ongoing calls


I have an app that, using WebRTC, is able to successfully connect and hold a video call. The actual call logic while the app is open is a separate concern but what I was looking for, is the classic "Press Home key and app backgrounds itself", only to be seen in a persistent notification with mute/hangup controls and details about the call.

Now Meet, Whatsapp all implement this, the UI is so similar that I'm convinced they're using the same API/Framework internally, likely something to do with the OS' telephony system integration (ConnectionService/CallKit all that).

How can I show a persistent notification for my call with hangup/mute icons on the notification (which I could hook up to my internal methods)?

I know for a fact something like this exists because my native calls, Meet, and WhatsApp all share the exact same notification template.

Is there a blank project that does nothing but show a persistent notification if that's the way to go, I just want to know how it's implemented as I found no references/"official way" online.


Solution

  • The flutter_callkit_incoming package does exactly this. For my purposes I needed to have the mic functioning in the background as well
    so I had to fork and add microphone as a category alongside phoneCall in the manifest service declaration and all worked like a charm