hiennguyen92 / flutter_callkit_incoming

Flutter Callkit Incoming
https://pub.dev/packages/flutter_callkit_incoming
MIT License
150 stars 237 forks source link

How to stop ringing Iphone when remote ended #474

Closed NyamdavaaUrt closed 2 months ago

NyamdavaaUrt commented 2 months ago

In IOS Native, one should use reportCall(with:endedAt:reason:) function to stop ringing.

The problem is, I also have to handle this case on android phone, which means I need curl request like the following:

curl -v \ -d '{"aps":{"alert":"Hien Nguyen Call"},"id":"44d915e1-5ff4-4bed-bf13-c423048ec97a","nameCaller":"Hien Nguyen","handle":"0123456789","isVideo":true}' \ -H "apns-topic: com.hiennv.testing.voip" \ -H "apns-push-type: voip" \ --http2 \ --cert VOIP.pem:'' \ https://api.development.push.apple.com/3/device/

What payload should I use to reportcall ended

afl-dev commented 3 weeks ago

if it's in the background you need to send a second notification (voip) when the call ends and report SwiftFlutterCallkitIncomingPlugin.sharedInstance?.endCall(data)