react-native-firebase-docs
react-native-firebase-docs copied to clipboard
notification bigText style
how can we make an expandable local notification, with a big text? right now it only shows one line.
me too, i have use setBigText, but not result.
how can we make an expandable local notification, with a big text? right now it only shows one line.
To use bigText in android you can use below code: let notification = new firebase.notifications.Notification(); notification.android.setBigText(text, contentTitle, summaryText);
I don't used setTitle, setBody, setData while using above setBigText property. so my final code for android and ios was
let notification = new firebase.notifications.Notification(); if (Platform.OS == 'android') { notification.android.setBigText(body, title); notification.android.setPriority(firebase.notifications.Android.Priority.High); notification.android.setChannelId("test-channel"); } else { notification = notification.setTitle(title).setBody(body).setData(data) } firebase.notifications().displayNotification(notification);
me too, i have use setBigText, but not result. You can use https://github.com/invertase/react-native-firebase-docs/issues/178#issuecomment-567351261