PopUp Alarm on selected days and selected time in android -
i want popup alarm on selected day i.e. monday ,tuesday , on. , @ selected time on every week. i've idea interval don't know how next day , popup alarm ?
you need use alarmmanager
, wakeclock
while processing intent
in service
(make sure release , chose right kind).
here great example : https://stackoverflow.com/a/8801990/220710
to day current day of week, @ question : android: how current day of week (monday, etc...) in user's language?
then use :
setinexactrepeating(int type, long triggeratmillis, long intervalmillis, pendingintent operation)
schedule repeating alarm has inexact trigger time requirements; example, alarm repeats every hour, not @ top of every hour.
then need set :
- type =
rtc_wakeup
- intervalmillis = ms in week
- triggeratmillis =
system.currenttimemillis()
+ ms next monday, tuesday or whatever - intent = intent want fire
service
process it.
Comments
Post a Comment