localnotificationsplugin
localnotificationsplugin copied to clipboard
Notification Action
Can I add some action to execute when the user clicks the notification or is there a way to do this? In your sample, it only relaunch the application. I want to open a page when clicking the notification.
+1 I was looking for a event in application's level to handle a notification touched event.
+1 I'm also looking for this feature
Hello guys!
I'm proposing a simple modification to handle this situation:
https://github.com/rdrscan/LocalNotificationsPlugin/commit/4401f58a5a15d1fe5e19c7e6235cf5e45bddc668 I also made a pull request: https://github.com/edsnider/LocalNotificationsPlugin/pull/8
+1 Any info?
+1 Though also include iOS as well please.
+1 UWP support would be good too. Looked at the code and it seems a new implementation just for UWP (currently it is supported via https://github.com/edsnider/LocalNotificationsPlugin/blob/master/src/Plugin.LocalNotifications.WinRT) would be needed using maybe https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.Notifications/ so that you can then set the ToastContent.Launch property to the desired id/query string. This can then be handled in OnActivated within the UWP app code.
+1 Is there any news about this feature? It would be awesome to have it. By the way does someone knows how to redirect to detail page to show Notification Details, can't find a solution and see in the Xamarin forums a lot of people with the same issue. Thanks in advance! This plugin is awesome, just add this functionality please!
I think that a click event on a local notification is essential. It's safe to assume that everybody needs to execute an action when they click on the notification. It would be complete and awesome!
In iOS just do this:
` public override void ReceivedLocalNotification(UIApplication application, UILocalNotification notification) { string NotificationKey = "LocalNotificationKey";
var c = notification.UserInfo[NotificationKey];
foreach (var x in notification.UserInfo.Keys)
{
var t = notification.UserInfo[x];
var d = t.Description;
}
// show an alert
// UIAlertController okayAlertController = UIAlertController.Create(notification.AlertAction, notification.AlertBody, UIAlertControllerStyle.Alert); // okayAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null)); // // Window.RootViewController.PresentViewController(okayAlertController, true, null); // // // reset our badge // UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0; }`