I have a list of about 20 dates all formated like
August 24,2011
How would i go about creating a list of all of these dates and setting them to the alarm manager,
So for example… Today is the 25, if a date in the AlarmManager is set to 25, a notification is made.
How would i go about doing this?
Convert to a date first, using a formatter. Then get the timestamp from the date object using getTime(). Pass the timestamp to
AlarmManagerand specify theRTCorRTC_WAKEUPalarm type. Something like:Do keep in mind that, alarms are not persistent, so setting alarms too far in the future is not reliable: if the user reboots your phone (or kills your app/service), the alarms will be cleared. To register alarms on reboot, create a broadcast receiver for
BOOT_COMPLETED.