简体   繁体   中英

Android Alarm Reminder

I have an app which is loading upcoming dates (like Birthdays) from an SQLite database and showing it on a ListView . That works fine. What I now want is to inform the user regular by an Alarm or Toast or something without starting the application. The user has the only option when to inform: on the same day or 1 day before and the time ! Has someone an idea how to realize this? Maybe a Service or a Timer , or both? I would be very pleased about some tips.

Take a look onto AlarmManager . Also note that the service doesn't persist alarms between sessions so you'll need to re-setup them after device boot. Another option may be using Google calendar API to create birthday events, notification will be handled by Google calendar app then.

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