flutter_callkit_incoming
flutter_callkit_incoming copied to clipboard
When app is killed mode and press the accept button it will throw this error
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):
@Chinmaybixie @hiennguyen92 @PaulBout1 @mtellect any update about this?
I am facing this issue too, any update on this? Also using the same package version
Any update??
@hiennguyen92 please help us with this. Thanks
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 Thanks a lot. will look into it.
@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?
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 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
@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
This point it's needed you pay attention to it https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/example/lib/main.dart#L146
Can you please help me with some exemplary code? I would be very grateful.
@zionnite Can you please please please help me with some exemplary code? I would be very grateful.
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