Home » Android » Alarmanager – where to put?

Alarmanager – where to put?

Posted by: admin November 1, 2017 Leave a comment


I’m planning to do an alarm app to notify user to return their borrowed dvds based on a set date time on my db. My question is where do I put the alarmanager? Is it in the main activity? or do I need to put it in a separate class?


That’s really up to you, and it has less to do with the working of your Application since it is moslty a programming structure/design.

Yes, if you use the AlarmManager a lot, and in a lot of places, I would put in another class. But there is nothing ‘wrong’ by putting it in your Activity.