How to set Alarm in Android?

后端 未结 4 1398
长发绾君心
长发绾君心 2020-11-27 17:52

Following is my code can Any body please tell me why it is not working .I have learned it from this tutorial. But it is not working any help will be appreciable.

M

4条回答
  •  鱼传尺愫
    2020-11-27 18:56

    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

提交回复
热议问题