flutter-webrtc / callkeep

iOS CallKit and Android ConnectionService for Flutter
MIT License
130 stars 139 forks source link

How stop the call when caller ends call? #95

Open ScottLee97 opened 2 years ago

ScottLee97 commented 2 years ago

A user calls someone and the backend would send out an FCM data-only message to the receiver which triggers the call. But what if the caller ends the call before the receiver picks up the call? Is there a way to end the call on the receiver's side when the caller ends call?

efraespada commented 2 years ago

No, you must control it by yourself.

I start calls with FCM data push messages (the app can be closed) and end them with Firestore Database (app is open and listening call-room changes).

ScottLee97 commented 2 years ago

Is it possible to start and end the call when the app is in the background? In other words, can the listening of call-room changes be done even when the app is in the background??

efraespada commented 2 years ago

No, when the app is terminated or backgrounded (even iOS) your listeners will stop receiving changes. Use push data messages to do that.