I think I don't have all the necessary permissions and await callKeep.setup(null, callSetup); throws an error:
I/flutter (29112): FlutterFire Messaging: An error occurred in your background messaging handler:
I/flutter (29112): PlatformException(E_ACTIVITY_DOES_NOT_EXIST, Activity doesn't exist, null, null)
Full code:
Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp();
final callKeep = FlutterCallkeep();
final callSetup = <String, dynamic>{
'ios': {
'appName': 'CallKeepDemo',
},
'android': {
'alertTitle': 'Permissions required',
'alertDescription':
'This application needs to access your phone accounts',
'cancelButton': 'Cancel',
'okButton': 'ok',
// Required to get audio in background when using Android 11
'additionalPermissions': <String>[],
'foregroundService': {
'channelId': 'com.company.my',
'channelName': 'Foreground service for my app',
'notificationTitle': 'My app is running on background',
// 'notificationIcon': 'Path to the resource icon of the notification',
},
},
};
await callKeep.setup(null, callSetup);
}
And in my AndroidManifest.xml, I have the following:
Hi,
I think I don't have all the necessary permissions and
await callKeep.setup(null, callSetup);
throws an error:Full code:
And in my AndroidManifest.xml, I have the following:
What permissions am I missing (https://github.com/flutter-webrtc/callkeep/issues/90)? Or is another issue is causing my problem?
Thanks, DK