简体   繁体   中英

Android notifications on different days of the week

I want to build notifications that are showed recurrently in specific days of the week, for example, I want X notification every monday and friday of each week. I know how to set intervals with alarms, but not how to select specific days

You can set repeating alarm for every day and show notification only those days that are needed on onReceive() function of the alarm BroadcastReceiver.

The logical way to control push notification timing is from server side but if you want to do it on your phone you must work with android os date and time and Java CALENDAR class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM