Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Amshaf123 opened this issue Mar 11, 2024 · 1 comment

Comments

@Amshaf123
Copy link

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

@TatankaConCube
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants