So I've managed to create a local notification in android. Part of the code is given below.
AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),alarmManager.INTERVAL_DAY,pendingIntent);
Now no problem with creating the notification. The thing is that I am currently testing it with a button press which starts the whole notification thing with the Notification appearing every day at the the same time. But, still I don't want to add a button for users to press so I'd have to remove the button and just run this alarm initiation code every time the user starts the app (on Main class' onCreate) just to make sure that notifications are activated. Yet, it does not seem proper to me to set the same alarm over and over since a single time would be enough. Does it actually cause any problems to be doing that continuously ? Or is there any way to get the current activated ALARM SERVICE ? (how?). I was thinking about using shared preferences for a single time activation, but the Service might be stopped in the meantime and no more notifications then. What do you suggest in such a scenario ? I have seen some other posts with nearly same question but it doesn't relate to mine.