public static void CancelAll() { char[] separator = new char[] { ';' }; string[] strArray = PlayerPrefs.GetString("area730_notification_ids").Split(separator); for (int i = 0; i < (strArray.Length - 1); i++) { AndroidNotifications.cancelNotification(Convert.ToInt32(strArray[i])); } PlayerPrefs.DeleteKey("area730_notification_ids"); }
/// <summary> /// Cancels all schedules notifications tracked with NotificationTracker.TrackId(int id) method. By default all notifications are tracked /// </summary> public static void CancelAll() { string keys = PlayerPrefs.GetString(IDS_KEY); string[] ids = keys.Split(';'); for (int i = 0; i < ids.Length - 1; ++i) { int id = System.Convert.ToInt32(ids[i]); AndroidNotifications.cancelNotification(id); } PlayerPrefs.DeleteKey(IDS_KEY); }