|
|
|
|
@ -404,6 +404,9 @@ class PushNotificationHandler {
|
|
|
|
|
String callerId,
|
|
|
|
|
) async {
|
|
|
|
|
log('🎈 example: onDidAcceptIncomingCall $uuid - $callerId');
|
|
|
|
|
|
|
|
|
|
String zoomSessionID = callerId.split("*")[0];
|
|
|
|
|
|
|
|
|
|
await voIPKit.acceptIncomingCall(callerState: CallStateType.calling);
|
|
|
|
|
await voIPKit.callConnected();
|
|
|
|
|
|
|
|
|
|
@ -414,10 +417,11 @@ class PushNotificationHandler {
|
|
|
|
|
_currentCallId = null;
|
|
|
|
|
await Future.delayed(Duration(seconds: 2)).then((val) async {
|
|
|
|
|
await voIPKit.endCall();
|
|
|
|
|
await voIPKit.dispose();
|
|
|
|
|
await FlutterCallkitIncoming.endAllCalls();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, callerId);
|
|
|
|
|
await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, zoomSessionID);
|
|
|
|
|
|
|
|
|
|
Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall);
|
|
|
|
|
Navigator.of(GetIt.instance<NavigationService>().navigatorKey.currentContext!).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation())));
|
|
|
|
|
@ -426,21 +430,9 @@ class PushNotificationHandler {
|
|
|
|
|
GetIt.instance<NavigationService>().navigatorKey.currentContext!,
|
|
|
|
|
AppRoutes.zoomCallPage,
|
|
|
|
|
// arguments: CallArguments(appointmentID, "111", "Patient", "40", "1", true, 1),
|
|
|
|
|
arguments: CallArguments(callerId, "123", "Patient", "40", "0", true, int.parse("1")),
|
|
|
|
|
arguments: CallArguments(zoomSessionID, "123", "Patient", "40", "0", true, int.parse("1")),
|
|
|
|
|
// arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// Navigator.pushNamed(
|
|
|
|
|
// locator<NavigationService>().navigatorKey.currentContext!,
|
|
|
|
|
// "zoom_call_page",
|
|
|
|
|
// arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false),
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
// Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN,
|
|
|
|
|
// arguments: VideoArgus(
|
|
|
|
|
// reservationId: int.parse(callerId), token: null, isVideo: true));
|
|
|
|
|
|
|
|
|
|
// timeOutTimer.cancel();
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|