v3rm0n / intercom_flutter

Flutter wrapper for Intercom libraries
94 stars 140 forks source link

Android Push Notification is not showing #416

Closed vasa137 closed 7 months ago

vasa137 commented 7 months ago

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.

deepak786 commented 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:

// 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

vasa137 commented 7 months ago

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.