/// <summary> /// Cancels all pending notification messages /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnClickCancelNotificationsWith(object sender, System.EventArgs e) { string Tag = "CancelNotificationsWith"; try { NotificationController.CancelNotificationsWith(this, "tag"); NotificationController.CancelNotificationsWith(this, new int[] { 1, 2 }); NotificationController.CancelNotificationsWith(this, new CancelNotificationParameters[] { new CancelNotificationParameters { Id = 5, Tag = "tag" }, new CancelNotificationParameters { Id = 6, Tag = "tag2" } }); log.Info(Tag, "Success"); } catch (ApiException exception) { log.Error(Tag, "Error/Exception: " + exception); } }
public void CancelNotificationsWith(XamarinFormsPushDemo.HMSPush.Model.CancelNotificationParameters[] idtags) { List <CancelNotificationParameters> list = new List <CancelNotificationParameters>(); foreach (var idtag in idtags) { list.Add(new CancelNotificationParameters { Id = idtag.Id, Tag = idtag.Tag }); } NotificationController.CancelNotificationsWith(Application.Context, list.ToArray()); }
public void CancelNotificationsWith(string tag) { NotificationController.CancelNotificationsWith(Application.Context, tag); }
public void CancelNotificationsWith(int[] ids) { NotificationController.CancelNotificationsWith(Application.Context, ids); }