Reputation: 163
I want to set an alarm after 5 min of current time in my application.I am using calendar.getMinutes()+5 to get the current time (minutes).But its not working.can anybody tell me where I am doing wrong?
Upvotes: 0
Views: 346
Reputation: 21
Calendar cal = Calendar.getInstance();
// add 5 minutes to the calendar object
cal.add(Calendar.MINUTE, 5);
Upvotes: 2