/// <summary> /// Method for processing the user's response to a delivered notification. /// </summary> /// <param name="center">The shared user notification center object that received the notification.</param> /// <param name="response">The user's response to the notification.</param> /// <param name="completionHandler">The action to execute when you have finished processing the user's response.</param> public static void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler) { NotifoIO.DidReceiveNotificationResponse(center, response, completionHandler); if (CrossFirebasePushNotification.Current is IUNUserNotificationCenterDelegate notificationDelegate) { notificationDelegate.DidReceiveNotificationResponse(center, response, completionHandler); } }
/// <summary> /// Invoked when the application received a remote notification. /// </summary> /// <param name="data">The notification data dictionary.</param> /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns> public static async Task DidReceiveMessageAsync(NSDictionary data) { Log.Debug(Strings.ReceivedNotification, data); if (ContainsPullRefreshRequest(data)) { await NotifoIO.DidReceivePullRefreshRequestAsync(); } FirebasePushNotificationManager.DidReceiveMessage(data); }
public override async void DidReceiveNotificationRequest(UNNotificationRequest request, Action <UNNotificationContent> contentHandler) { ContentHandler = contentHandler; BestAttemptContent = (UNMutableNotificationContent)request.Content.MutableCopy(); NotifoIO.Current.SetNotificationHandler(new NotificationHandler()); await NotifoIO.DidReceiveNotificationRequestAsync(request, BestAttemptContent); ContentHandler(BestAttemptContent); }