Reputation: 171
I am trying to send a push notification with a button in azure notification hub. I just found this example for iOS,
Is there a way to add a button to azure push notifications to Xamarin forms
Upvotes: 0
Views: 309
Reputation: 65481
Yes, it is possible.
The documentation of how to do this is here: https://learn.microsoft.com/en-us/azure/developer/mobile-apps/notification-hubs-backend-service-xamarin-forms
Edit:
To get a cancel button you need to define a dismiss action:
var categoryID = "message";
var actions = new UNNotificationAction [] { action };
var intentIDs = new string [] { };
var categoryOptions = new UNNotificationCategoryOptions [] { };
var category = UNNotificationCategory.FromIdentifier (categoryID, actions, intentIDs, UNNotificationCategoryOptions.CustomDismissAction);
Upvotes: 0