public void CancelAllScheduledAlarm(){ int len = alarmRequestCodeCollection.Count; for(int index=0;index<len;index++){ int currentRequestCode = alarmRequestCodeCollection[index]; alarmPlugin.CancelAlarm(currentRequestCode); } }
public void CancelAllScheduledAlarm() { //this only works when you just place alarm and you are still not closing the app //to make it work anytime you need to save the request code on player pref or //any tool that can save data and pass it on Cancel Alarm int len = alarmRequestCodeCollection.Count; for (int index = 0; index < len; index++) { int currentRequestCode = alarmRequestCodeCollection[index]; alarmPlugin.CancelAlarm(currentRequestCode); } alarmRequestCodeCollection.Clear(); }