setSpeaker support & emit pushkit notification for ios for seamless & reliable voip calls on ios
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 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
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