Closed omxie closed 1 year ago
For android you can change the appearance of the default push notification and therefore add your 3 action buttons 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 think 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 :)
Hi there,
I am trying to send a notification to the device with 3 action buttons and perform certain tasks on click of those buttons. Is it possible to use the plugin to do so? or does it have to be implemented something natively.
Thanks!