I've just learned about the AlarmManager and tried to play around with it. As I understood the alarms are set by saying that it needs to be called after X miliseconds like in the code below:
am.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (sec * 1000), pendingIntent);
However, I'm concerned about the performance of system when it comes to long periods of time.
If I need to set alarm that will activate notification say after 10 months, what should I do? Do I need to convert needed period of time into miliseconds and pass it in the same way? Or there are other more efficient ways to work with long periods of time?