Closed vasa137 closed 7 months ago
@vasa137 As per the migration guide https://developers.intercom.com/installing-intercom/android/fcm-migration-guide/, nothing has been changed in the SDK. It is just a server change.
I'm not sure why you are not able to receive the background notifications. Could you please check the following:
FirebaseMessaging.instance.requestPermission(
alert: true,
announcement: false,
badge: true,
carPlay: false,
criticalAlert: false,
provisional: false,
sound: true,
);
onBackgroundMessage
to firebase_messaging and see if it prints the message on console.
/// top level function to listen for messages in the background
@pragma('vm:entry-point')
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
// received the message when the app was in background
print(message.toMap());
}
// listen for background messages FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
- There is a new intercom-android SDK version 15.7.0 but currently intercom_flutter is not updated with this new SDK release. Corresponding PR https://github.com/v3rm0n/intercom_flutter/pull/415 is not yet merged. I suggest you to try the latest SDK version.
dependency_overrides: intercom_flutter: git: url: https://github.com/v3rm0n/intercom_flutter path: intercom_flutter ref: update_native_sdk
I've managed to overcome this issue by updating firebase_messaging library to version 14.7.19.
Thanks for your support.
Marking it as closed.
Intercom recently switched to Firebase FCM API v1. I've followed this guide - https://developers.intercom.com/installing-intercom/android/fcm-migration-guide/
Also, when I send PUSH from my server, it's showing well. So token is good and sent to Intercom. Also on Intercom Portal, user is eligible for receiving push notifications - which means token is received.
I am not overriding "onBackgroundMessage" in firebase_messaging package, so everything I use is pretty standalone.
How to debug this issue, what can be the reason?
The way I test it - I put the app in the background and send a message from Intercom's "Help Desk"
I am stuck for a few days already and Intercom's support is not providing the solution.