callkeep icon indicating copy to clipboard operation
callkeep copied to clipboard

setSpeaker support & emit pushkit notification for ios for seamless & reliable voip calls on ios

Open shivanshtalwar0 opened this issue 6 months ago • 2 comments

In this pr i have introduced setSpeaker method which lets you toggle speaker on and off in sync with native call UI, along with that i have introduced a pushkit event for dart side to handle cases such as when we want to notify app of call should hangup by using something like this below when you send a pushkit notification on voip channel with alert so ios wont interpret it as another call and we can safely handle hangup.

callKeep.on<CallKeepPushPayload>((event) async {
      print('CallKeepPushPayload: ${event.payload}');
      final state = event.payload?['state'] ?? 'started';
      final eventType = event.payload?['eventType'] ?? '';
      if (state == 'ended' && eventType == 'call') {
        await endIncomingCall(event.payload?['uuid'] ?? '');
        return;
      }
    });

shivanshtalwar0 avatar Jul 16 '25 09:07 shivanshtalwar0

@shivanshtalwar0 there is a lot of formatting changes in the PR which is crowding the diff unnecessarily and making it difficult to review, also the package name changes need to be removed

sidevesh avatar Aug 19 '25 17:08 sidevesh

I thought no one is maintaining it anymore so i decided to publish my own forked package now if you still think this would help i can submit a new pr or if not i can close this pr

shivanshtalwar0 avatar Aug 19 '25 18:08 shivanshtalwar0