intercom_flutter
intercom_flutter copied to clipboard
Banner not showing
**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); }
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));
The issue happened on Android, Other feature work perfectly (Push noti, Carousel)
I'm facing this issue on iOS