Open rekonvald opened 3 years ago
Have you fixed this issue? I have the exact same problem.
Hi! No, I use https://pub.dev/packages/connectycube_flutter_call_kit
Same issue here ...
any solution yet?
I had the same issue. After some log-analysis I found out that in my case the phone account initialzation was done at a time where it couldn't do its job. Specifically the phone account check:
bool hasPhoneAccount = await callKeep.hasPhoneAccount();
if (!hasPhoneAccount) {
hasPhoneAccount = await callKeep.hasDefaultPhoneAccount(context, callSetup["android"]);
}
After putting it in the initialising of the first screen the user actually sees it worked for me.
@janhelwich How do you get the setting to stay I added the same code but it comes up on each app launch.
Hey @rlee1990 , honestly i think i didn't do anything more. It just does stay.
Hi! I am facing such issue: I use FCM for handling background messages and I try to init callkeep into my backgroundMessageHandler as it is described into example, but when I call _callKeep.setup i get
[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(E_ACTIVITY_DOES_NOT_EXIST, Activity doesn't exist, null, null) E/flutter (21173): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:581:7)
I added all necessary permissions into AndroidManifest.xml:
I also updated my activity: `import android.app.NotificationChannel import android.app.NotificationManager import android.content.Context import android.os.Build import io.flutter.app.FlutterApplication import io.flutter.plugin.common.PluginRegistry import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback import io.flutter.view.FlutterMain import com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin import com.github.cloudwebrtc.flutter_callkeep.FlutterCallkeepPlugin import io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService import io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin
class Application : FlutterApplication(), PluginRegistrantCallback { override fun onCreate() { super.onCreate() this.createChannel() FlutterFirebaseMessagingBackgroundService.setPluginRegistrant(this); FlutterMain.startInitialization(this) }
}`
I would great maybe to skip _checkPhoneAccountPermission, I just want to use it for displaying incoming call window when app is in background/locked or terminated.
BTW: when I use _callKeep.backToForeground() it works for Android 9, but doesn't for Android 11