how to show multiple line notification in android? -


After

I am making a notification with several lines, such as code:

  private zeros sendNotification (String Msg) {mNotificationManager = (Notification Manager) this.getSystemService (Reference.NETIFICATION_SERVICE); Pending Content ContentIntent = PendingEntactivity.activity (this, 0, new intent (this, home class), 0); MBuilder = New NotificationCompat.Builder (this) .setSmallIcon (R.drawable.ic_launcher) .setContentTitle ("") NotificationCompat.Builder; // // Notice the Big View Styling to see the full contents of the message. BigTextStyle InboxStyle = New Notification BigTextStyle (); InboxStyle.setBuilder (mBuilder); inboxStyle.bigText (MSG); InboxStyle.setBigContentTitle (""); inboxStyle.setSummaryText (""); // Transfers the big visual style object in Notification Object mBuilder.setStyle (inboxStyle); MBuilder.setContentText (MSG); MBuilder.setDefaults (Notification.DEFAULT_ALL); MBuilder.setContentIntent (contentIntent); MNotificationManager.notify (NOTIFICATION_ID, mbuilder.build ()); }   

But it only shows a line notification, I like it to show all the content of information with multiple lines. Can you help me

Thank you very much

Can be used with larger view: Large picture style, large text style, inbox style indicates the use of the following code BigTextStyle () that allows up to 256 DPs.

  string longText = "..."; Notification note = new notification. Builder (this). ..... .setStyle (New Notification.BigTextStyle). BigText (LongText))   

For more context, check this

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -