Closed Hantse closed 1 year ago
For android you can change the appearance of the default push notification by setting the static NotificationBuilderProvider
Func
of the android FirebaseCloudMessagingImplementation
class:
...
FirebaseCloudMessagingImplementation.NotificationBuilderProvider = CreateNotificationBuilder;
...
private static NotificationCompat.Builder CreateNotificationBuilder(FCMNotification notification)
{
return new NotificationCompat.Builder(_context, ChannelId)
.SetSmallIcon(Resource.Drawable.ic_push)
.TrySetBigPictureStyle(notification)
.SetContentTitle(notification.Title)
.SetContentText(notification.Body)
.SetPriority(NotificationCompat.PriorityDefault)
.SetAutoCancel(true);
}
For iOS I'm not sure how to achieve this, but I guess you'll need to add an iOS extension project to customize your push notifications. Last time I checked this wasn't possible for .NET MAUI applications yet, but maybe it's now. If you are successful implementing it that way, please let us now :)
Hello,
I've read all the documentation, and i search to remove the default "notification" system to handle and set notification myself with another plugin, it's possible to do it ? (https://github.com/thudugala/Plugin.LocalNotification)
Kr