flutter_callkit_incoming icon indicating copy to clipboard operation
flutter_callkit_incoming copied to clipboard

When app is killed mode and press the accept button it will throw this error

Open Chinmaybixie opened this issue 2 years ago • 14 comments

I am using this version - flutter_callkit_incoming: ^1.0.2+1

It will work fine on background mode, but not work on terminated or killed mode.

E/flutter (27767): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Unsupported value: 'Data(args={})' of type 'class com.hiennv.flutter_callkit_incoming.Data', , null) E/flutter (27767): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7) E/flutter (27767): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18) E/flutter (27767): E/flutter (27767): #2 FlutterCallkitIncoming.activeCalls (package:flutter_callkit_incoming/flutter_callkit_incoming.dart:72:12) E/flutter (27767): E/flutter (27767): #3 _MyAppState.getCurrentCall (package:digi_happy/main.dart:183:17) E/flutter (27767): E/flutter (27767): #4 _MyAppState.checkAndNavigationCallingPage (package:digi_happy/main.dart:174:23) E/flutter (27767): E/flutter (27767):

Chinmaybixie avatar May 26 '22 06:05 Chinmaybixie

@Chinmaybixie @hiennguyen92 @PaulBout1 @mtellect any update about this?

saifullah45152 avatar Jun 24 '22 14:06 saifullah45152

I am facing this issue too, any update on this? Also using the same package version

abdo400 avatar Jul 01 '22 22:07 abdo400

Any update??

billthecoder046 avatar Jul 02 '22 07:07 billthecoder046

@hiennguyen92 please help us with this. Thanks

waqadArshad avatar Jul 02 '22 08:07 waqadArshad

Hi guys, I found this solution which worked for me. You need to change the package reference in pubspec.yaml to the new repo link. https://github.com/hiennguyen92/flutter_callkit_incoming/issues/132#issuecomment-1144783258

abdo400 avatar Jul 02 '22 10:07 abdo400

@abdo400 Thanks a lot. will look into it.

waqadArshad avatar Jul 02 '22 18:07 waqadArshad

@abdo400 also did you implement this with Firebase? I am having issues with navigation on call in the background and terminated state. Can you please help me with that?

waqadArshad avatar Jul 02 '22 18:07 waqadArshad

You have to call the showCallkitIncoming method in FirebaseMessaging.onBackgroundMessage. This is will insure it executes your logic when the notification comes. I also have a bunch of android permissions in android/app/main/AndroidManifest.xml from my tries with other packages but not sure if these are responsible for anything yet. <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/> <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> My guess is the first two might be important, I still have to remove these and test again. And I also implemented MyApp methods as mentioned in the example

abdo400 avatar Jul 02 '22 20:07 abdo400

@abdo400 Thanks for all this but the problem is not I do get the call notification in the background state but I am having problems with navigating to a specific screen on ACCEPT event. Please have a look at this: https://github.com/hiennguyen92/flutter_callkit_incoming/issues/141#issuecomment-1172962068

waqadArshad avatar Jul 02 '22 21:07 waqadArshad

@abdo400 Thanks for all this but the problem is not I do get the call notification in the background state but I am having problems with navigating to a specific screen on ACCEPT event. Please have a look at this: https://github.com/hiennguyen92/flutter_callkit_incoming/issues/141#issuecomment-1172962068

Follow this example

https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/example/lib/main.dart

For me, am using firebase to listen to event changes but @hiennguyen92 use other method which others have used and got excellent result

zionnite avatar Jul 03 '22 10:07 zionnite

This point it's needed you pay attention to it https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/example/lib/main.dart#L146

zionnite avatar Jul 03 '22 10:07 zionnite

Can you please help me with some exemplary code? I would be very grateful.

waqadArshad avatar Jul 03 '22 10:07 waqadArshad

@zionnite Can you please please please help me with some exemplary code? I would be very grateful.

waqadArshad avatar Jul 03 '22 13:07 waqadArshad

Hi guys, I found this solution which worked for me. You need to change the package reference in pubspec.yaml to the new repo link. #132 (comment)

Failed while building for Android. Not working for me

booooohdan avatar Jul 15 '22 20:07 booooohdan