java - How to set up a notification every day at the same time? -
how can set notification every day @ same time? have tried in following way every time launch app, see notification , not correct.
this mainactivity:
public void setrepeatingalarm() { intent intent = new intent(this, myalarmservice.class); pendingintent pendingintent = pendingintent.getbroadcast(this, 0, intent, pendingintent.flag_cancel_current); calendar calendar = calendar.getinstance(); calendar.set(calendar.hour_of_day, 12); calendar.set(calendar.minute, 00); calendar.set(calendar.second, 00); am.setrepeating(alarmmanager.rtc_wakeup, calendar.gettimeinmillis(), alarmmanager.interval_day , pendingintent); }
Comments
Post a Comment