connectycube-flutter-call-kit icon indicating copy to clipboard operation
connectycube-flutter-call-kit copied to clipboard

Firebase Cloud Messaging API (V1): Issue with _firebaseMessagingBackgroundHandler Incoming Call Ringtone sound Not Working

Open Amshaf123 opened this issue 11 months ago • 1 comments

Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { print("Handling a background message: ${message.messageId}"); await Firebase.initializeApp(); //make sure firebase is initialized before using it (showCallkitIncoming) showCallkitIncoming(const Uuid().v4()); }

Future showCallkitIncoming(String uuid) async { final params = CallKitParams( id: uuid, nameCaller: 'Hien Nguyen', appName: 'Callkit', avatar: 'https://i.pravatar.cc/100', handle: '0123456789', type: 0, duration: 30000, textAccept: 'Accept', textDecline: 'Decline', missedCallNotification: const NotificationParams( showNotification: true, isShowCallback: true, subtitle: 'Missed call', callbackText: 'Call back', ), extra: <String, dynamic>{'userId': '1a2b3c4d'}, headers: <String, dynamic>{'apiKey': 'Abc@123!', 'platform': 'flutter'}, android: const AndroidParams( isCustomNotification: true, isShowLogo: false, ringtonePath: 'system_ringtone_default', backgroundColor: '#0955fa', backgroundUrl: 'assets/test.png', actionColor: '#4CAF50', textColor: '#ffffff', ), ios: const IOSParams( iconName: 'CallKitLogo', handleType: '', supportsVideo: true, maximumCallGroups: 2, maximumCallsPerCallGroup: 1, audioSessionMode: 'default', audioSessionActive: true, audioSessionPreferredSampleRate: 44100.0, audioSessionPreferredIOBufferDuration: 0.005, supportsDTMF: true, supportsHolding: true, supportsGrouping: false, supportsUngrouping: false, ringtonePath: 'system_ringtone_default', ), ); await FlutterCallkitIncoming.showCallkitIncoming(params); } // Legacy is working but V1 Ringtone sound Not Working And another interesting news, lagacy will be eliminated on 6/20/2023 WhatsApp Image 2024-03-07 at 6 15 46 PM

Amshaf123 avatar Mar 11 '24 09:03 Amshaf123

And another interesting news, lagacy will be eliminated on 6/20/2023

if you use the ConnectyCube API for sending the push notifications, you already can use the FCM Service Account Key instead of a Server key.

are you sure that the provided code samples are related to this plugin? our plugin doesn't have some parts of the provided parameters

TatankaConCube avatar Mar 11 '24 10:03 TatankaConCube