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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -