Custom notification

Anonymous
2022-09-13T13:16:26.387+00:00

How to create a received message notification to look like a other sms notifications. My notification does not look like the notifications of the usual sms app as for the notification of the usual sms app then it has a drop down that when clicked the entire message body can be seen with a button for calling the sender or replying. 

    NotificationCompat.Builder builder = new NotificationCompat.Builder(context)  
                .SetSmallIcon(Resource.Drawable.ic_chat).SetLargeIcon(BitmapFactory.DecodeResource(Resources.System, Resource.Drawable.ic_chat))  
                 
                .SetAutoCancel(true)  
                .SetStyle(inbox)  
                .SetDefaults(NotificationCompat.DefaultAll); 
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,336 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 74,486 Reputation points Microsoft Vendor
    2022-09-14T06:52:04.02+00:00

    Hello,

    Based on your description, you want to achieve notification like this document: Show a conversation in a notification

    You can use NotificationCompat.MessagingStyle in style of notification.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.