public Notification Render(Context context, string channelId) { var builder = new NotificationCompat.Builder(context, channelId) .SetContentTitle(Title) .SetContentText(Body) .SetVisibility((int)NotificationVisibility.Public) .SetCategory(Notification.CategoryMessage) .SetContentIntent(CreateLaunchIntent(context)); builder.SetWhen(NotifyTime.ToUnixTime()); if (Icon?.Name.HasValue() == true) { builder.SetSmallIcon(Icon.ConvertToId(context)); } if (OS.IsAtLeast(BuildVersionCodes.Lollipop) && TransparentIcon?.Name.HasValue() == true) { builder.SetSmallIcon(TransparentIcon.ConvertToId(context)); builder.SetColor(Color.Parse(TransparentIconColor.Or("transparent")).Render().ToArgb()); } if (PlaySound) { builder.SetSound(LocalNotification.GetSoundUri()); } return(builder.Build()); }