intercom_flutter icon indicating copy to clipboard operation
intercom_flutter copied to clipboard

Banner not showing

Open duchoangquoine opened this issue 3 years ago • 3 comments

**Has anyone encountered issue that the app could not received banner?

Below is the config on launch:**

static initialize( String appId, String iosApiKey, String androidApiKey) async { //Setup intercom await Intercom.initialize( appId, iosApiKey: iosApiKey, androidApiKey: androidApiKey, ); await Intercom.setLauncherVisibility(IntercomVisibility.gone); await Intercom.setInAppMessagesVisibility(IntercomVisibility.visible);

FirebaseMessaging messaging = FirebaseMessaging.instance;
final String? token = Platform.isIOS
    ? await messaging.getAPNSToken()
    : await messaging.getToken();
;
if (token != null) {
  await Intercom.sendTokenToIntercom(token);
}

//Update when has new FCM token
FirebaseMessaging.instance.onTokenRefresh
    .listen((token) => Intercom.sendTokenToIntercom(token));

}

static hanldePush(Map<String, dynamic> message) { Intercom.handlePush(message); }

duchoangquoine avatar Feb 21 '22 03:02 duchoangquoine

do you have the issue on iOs or Android?

The below code should also have the check Android. We only want to send the FCM token for Android.

// Update when has new FCM token
FirebaseMessaging.instance.onTokenRefresh
    .listen((token) => Intercom.sendTokenToIntercom(token));

deepak786 avatar Feb 21 '22 11:02 deepak786

The issue happened on Android, Other feature work perfectly (Push noti, Carousel)

duchoangquoine avatar Feb 21 '22 11:02 duchoangquoine

I'm facing this issue on iOS

NaarGes avatar Jul 29 '23 09:07 NaarGes