How to set Alarm in Android programmatically?

I think you want to set the alarm for 26th June and not 26th July. If so then change cal.set(Calendar.MONTH,6); to cal.set(Calendar.MONTH,5); because the months are zero-based. if you intend the alarm to fire on 26th july then it is expected that the alarm will fire when the date-time is 26th July 2011, 17:30

Leave a Comment