i preparing app "to-do list"
in user sets alarm task. problem don't know how set alarm using date , time pickers
.
the working need user first selects date , time. date , time used set notification
on specified date , time. , after clicking on notification, activity contains whole list starts. in activity, once task marked finish, alarm must removed specific date , time.
please me. trying first time. please me learning this.
ps: work i've done till is, have prepared activity takes necessary details task such task brief, task priority, task date task time, , storing in database. can mark task done / undone. work i'm remaining setting notification task.
find difference between current time , time @ work id done in milliseconds , set alarm.
alarmmanager am=(alarmmanager)context.getsystemservice(context.alarm_service); intent intent = new intent(context, alarmmanagerbroadcastreceiver.class); pendingintent pi = pendingintent.getbroadcast(context, 0, intent, 0); am.setrepeating(alarmmanager.rtc_wakeup, system.currenttimemillis(), 1000 * diffinmillis , pi);
hope helps
Comments
Post a Comment