Search code examples
androidbroadcastreceiveralarmmanagerandroid-alarmsrepeat

How to create alarm with date, time and repetition for some days(suppose 10 days) which show alert even the phone is reset or lock?


I am creating a reminder application for that i want to create a alarm with date time and number of days repetation. As i am new in android development can any one please help me with this?

I have check this link


Solution

  • You need to use an AlarmManager for that. The only thing to take into account is that you need to restart your alarm if your phone is resetted, but you can listen for an android.intent.action.BOOT_COMPLETED broadcast message and restart it there.

    This guide contains everything you need, there's no need to go trough that here:

    Scheduling Repeating Alarms