react-native-firebase-docs icon indicating copy to clipboard operation
react-native-firebase-docs copied to clipboard

notification bigText style

Open felipeaugusto1 opened this issue 5 years ago • 3 comments

how can we make an expandable local notification, with a big text? right now it only shows one line.

felipeaugusto1 avatar Apr 26 '19 12:04 felipeaugusto1

me too, i have use setBigText, but not result.

windydang26 avatar Jun 06 '19 02:06 windydang26

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);

jdvvaghelaoffice avatar Dec 19 '19 06:12 jdvvaghelaoffice

me too, i have use setBigText, but not result. You can use https://github.com/invertase/react-native-firebase-docs/issues/178#issuecomment-567351261

jdvvaghelaoffice avatar Dec 19 '19 06:12 jdvvaghelaoffice