callkeep
callkeep copied to clipboard
CallKeepPerformAnswerCallAction Called Twice
I have noticed that CallKeepPerformAnswerCallAction is being called twice if another call is made without either closing the application or restarting the application. This so far has been tested on android and it causes the app to push the same route twice.
+1 we're getting this issue as well
What I did as a workaround @ejimenez93 was this
_callkeep.on(CallKeepPerformAnswerCallAction(),
(CallKeepPerformAnswerCallAction event) {
if (!showCall) {
print("called from tab");
if (Platform.isAndroid) {
_callkeep.endAllCalls();
}
final channel =
SNAB.streamChatClient.channel('message', id: callerId);
AutoRouter.of(context).push(ChatVideoCallRoute(
channel: channel, uid: callerId, isIncoming: true));
setState(() {
showCall = true;
});
}
Future.delayed(Duration(seconds: 1)).then((value) {
setState(() {
showCall = false;
});
});
});