More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Sunday, 13 October 2019 3:16:06 PM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 521

Xamarin Forms Android Push Notifications BigTextStyle

With BigTextStyle,  entire message is visible. You can also set summary text and big content title.

           

Code:
// Instantiate the Big Text style:
            NotificationCompat.BigTextStyle textStyle = new NotificationCompat.BigTextStyle();
            //Notification.BigTextStyle textStyle = new Notification.BigTextStyle();

            // Fill it with text:             string longTextMessage = messageBody;             textStyle.BigText(longTextMessage);

            // Set the summary text:             //textStyle.SetSummaryText("The summary text goes here.");

            builder.SetStyle(textStyle);

Or it can be as simple as one line:            

Code:
builder.SetStyle(new NotificationCompat.BigTextStyle().BigText(messageBody));

Note that NotificationCompat is used instead of Notification.

References:

Notification.BigTextStyle not appearing

Is possible set Expanded Notification as default in Big Text Notifications?​​​​​​​

Edited by user Sunday, 13 October 2019 3:24:14 PM(UTC)  | Reason: Not specified

Sponsor
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.