Set AlarmManager from DatePicker and TimePicker
问题 I'm very stuck creating an alarm from a DatePicker and TimePicker... This is the code of my try: Calendar cal=Calendar.getInstance(); cal.set(Calendar.DAY_OF_MONTH, datePicker.getDayOfMonth()); cal.set(Calendar.MONTH, datePicker.getMonth()); cal.set(Calendar.YEAR, datePicker.getYear()); cal.set(Calendar.HOUR, timePicker.getCurrentHour()); cal.set(Calendar.MINUTE, timePicker.getCurrentMinute()); long millis=cal.getTimeInMillis(); Intent intent=new Intent(CalendarView.this,AvisoReceiver.class);