I am developing an Android app to set up alarms daily, weekly, monthly. The first two work fine, converting the date and time of dates into milliseasons. But when I try to do the same in a month, it will not work. There is a completely different date format.
I install it as shown below
Alarmtimefor30 has a given date in milliseconds.
am.setRepeating(AlarmManager.RTC_WAKEUP, alarmTimefor30, 30*1440*60000 , pi);
I give the Millis interval as 30 * 1440 * 60000, which leads to 2592000000, i.e. 30 days in milliseconds. When I try to print 30 * 1440 * 60,000, the result will be 1702967296. I am not sure what might be the problem.
Is there another way to set a monthly alarm (run at a specific date and time every month)?
Please, help! Thanks!
source share