using a service or not in android
well in my app I want the user to get notifications depending on the time is it. So, it must check all the time current date and time, and giving notification for the upcoming event.
I have found tutorials like these: tutorial 1
but all of these are triggered after pressing a button and setting something like an alarm.
But I want my app to be able to do that "checks" all the time. So do I have to use a service or is there any other way? I have never used services before that's why I am not sure if this is what I need or not.
EDIT: I cam wondering if using alarm. My problem in that case is that I do not any interference from the user. I mean he must not press a button to set the alarm but the app has to worki like this: first alarm at: sunday 9 october 11:00 next at: same day 18:00 next: 10 sept 07:00 and so on..
If you don't need to check notifications when the app isn't running, you can just use Handler.postDelayed to have your code run after some time has passed.
If you want to check notifications in the background even if your app isn't running, you'll need to use an alarm. Check the AlarmManager out.